#include <MixtureStat.h>
List of all members.
Public Member Functions |
| | MixtureStat (StatServer &, const Mixture &, const Config &) |
| virtual | ~MixtureStat () |
| Mixture & | getMixture () const |
| void | resetLLK () |
| lk_t | computeLLK (const Feature &f) |
| lk_t | computeLLK (const Feature &f, unsigned long idx) |
| lk_t | getLLK () const |
| lk_t | getAccumulatedLLK () const |
| lk_t | computeAndAccumulateLLK (const Feature &f, double w=1.0f, const TopDistribsAction &a=TOP_DISTRIBS_NO_ACTION) |
| lk_t | computeAndAccumulateLLK (const Feature &f, const LKVector &topDistribsVector, double w=1.0f) |
| lk_t | computeAndAccumulateLLK () |
| lk_t | accumulateLLK (lk_t llk, double w=1.0) |
| lk_t | getMeanLLK () const |
| double | getAccumulatedLLKFeatureCount () const |
| void | resetOcc () |
| real_t | getAccumulatedOccFeatureCount () const |
| DoubleVector & | getOccVect () |
| const DoubleVector & | getOccVect () const |
| DoubleVector & | getAccumulatedOccVect () |
| const DoubleVector & | getAccumulatedOccVect () const |
| occ_t | getAccumulatedOcc () |
| real_t | computeAndAccumulateOcc (const Feature &f, weight_t w=1.0) |
| DoubleVector & | getMeanOccVect () |
| virtual void | resetEM ()=0 |
| virtual occ_t | computeAndAccumulateEM (const Feature &f, real_t weight=1.0)=0 |
| virtual void | addAccEM (const MixtureStat &)=0 |
| virtual const Mixture & | getEM ()=0 |
| real_t | getEMFeatureCount () const |
| virtual String | getClassName () const =0 |
| virtual String | toString () const |
Protected Member Functions |
| real_t | computeOccVect (const Feature &) |
| void | assertResetEMDone () const |
Protected Attributes |
| const unsigned long | _distribCount |
| const Mixture * | _pMixture |
| const Config & | _config |
| const lk_t | _minLLK |
| const lk_t | _maxLLK |
| lk_t | _llk |
| lk_t | _accumulatedLLK |
| double | _featureCounterForAccumulatedLK |
| DoubleVector | _occVect |
| DoubleVector | _accumulatedOccVect |
| DoubleVector | _meanOccVect |
| real_t | _featureCounterForAccumulatedOcc |
| bool | _resetedEM |
| StatServer * | _pStatServer |
| real_t | _featureCounterForEM |
Private Member Functions |
| bool | operator== (const MixtureStat &) const |
| bool | operator!= (const MixtureStat &) const |
| const MixtureStat & | operator= (const MixtureStat &) |
| | MixtureStat (const MixtureStat &) |
Friends |
| class | TestMixtureGFStat |
| class | TestMixtureGDStat |
| class | TestMixtureStat |
Detailed Description
Abstract class used to make calculation in a Mixture object and to store and accumulate results
- Author:
- Frederic Wils frederic.wils@lia.univ-avignon.fr
- Version:
- 1.0
- Date:
- 2003
Definition at line 85 of file MixtureStat.h.
Constructor & Destructor Documentation
| virtual alize::MixtureStat::~MixtureStat |
( |
) |
[virtual] |
| alize::MixtureStat::MixtureStat |
( |
const MixtureStat & |
) |
[private] |
Member Function Documentation
| lk_t alize::MixtureStat::accumulateLLK |
( |
lk_t |
llk, |
|
|
double |
w = 1.0 |
|
) |
| |
Accumulates the log-likelihood.
- Parameters:
-
| llk | the value to accumulate |
| w | the weigth (0...1) |
- Returns:
- the same log-likelihood value (not multiplied by w)
| virtual void alize::MixtureStat::addAccEM |
( |
const MixtureStat & |
) |
[pure virtual] |
| void alize::MixtureStat::assertResetEMDone |
( |
) |
const [protected] |
| virtual occ_t alize::MixtureStat::computeAndAccumulateEM |
( |
const Feature & |
f, |
|
|
real_t |
weight = 1.0 |
|
) |
| [pure virtual] |
Acumulate data for EM algorithm
- Parameters:
-
- Exceptions:
-
- Returns:
- sum of occupations BEFORE normalization
| lk_t alize::MixtureStat::computeAndAccumulateLLK |
( |
) |
|
Like computeAndAccumulateLLK(const Feature& f...) but using the internal precalculated log-likelihood array.
- Returns:
- the log-likelihood value
- Exceptions:
-
| Exception | if no mixture server is connected to the stat server (the log-likelihood array is not computed) |
Like computeLLK() and, in addition, accumulate the log-likelihood. The internal feature counter increases by w.
- Parameters:
-
| f | the feature |
| w | the weight of the feature |
| a | flag used to deal with top distributions |
- Returns:
- the log-likelihood for this feature (not multiplied by w)
- Exceptions:
-
| Exception | if the dimension of the mixture is not equals to the dimension of the feature |
| lk_t alize::MixtureStat::computeAndAccumulateLLK |
( |
const Feature & |
f, |
|
|
const LKVector & |
topDistribsVector, |
|
|
double |
w = 1.0f |
|
) |
| |
Like computeLLK() and, in addition, accumulate the log-likelihood. The internal feature counter increases by w.
- Parameters:
-
| f | the feature |
| w | the weight of the feature |
| topDistribsVector | a top distributions vector |
- Returns:
- the log-likelihood for this feature (not multiplied by w)
- Exceptions:
-
| Exception | if the dimension of the mixture is not equals to the dimension of the feature |
Computes and accumulates occupation of a feature
- Parameters:
-
| f | the feature |
| w | the weight of the feature |
- Returns:
- ???
| lk_t alize::MixtureStat::computeLLK |
( |
const Feature & |
f, |
|
|
unsigned long |
idx |
|
) |
| |
Computes log-likelihood between a mixture and a parameter of a feature
- Parameters:
-
| f | the feature |
| idx | the index of the parameter of the feature |
- Returns:
- the log-likelihood
| lk_t alize::MixtureStat::computeLLK |
( |
const Feature & |
f ) |
|
Computes log-likelihood between a mixture and a feature
- Parameters:
-
- Returns:
- the log-likelihood
| real_t alize::MixtureStat::computeOccVect |
( |
const Feature & |
) |
[protected] |
| lk_t alize::MixtureStat::getAccumulatedLLK |
( |
) |
const |
Returns the accumulated log-likelihood computed between the mixture and the last feature
- Returns:
- the accumulated log-likelihood computed between the mixture and the last feature
| double alize::MixtureStat::getAccumulatedLLKFeatureCount |
( |
) |
const |
Returns the count of accumulated features for llk
- Returns:
- the count of accumulated features for llk
| occ_t alize::MixtureStat::getAccumulatedOcc |
( |
) |
|
Computes and return the sum of accumulated occupations
- Returns:
- the sum of accumulated occupations
| real_t alize::MixtureStat::getAccumulatedOccFeatureCount |
( |
) |
const |
Returns the count of accumulated features for occupation
- Returns:
- the count of accumulated features
Gets a reference to the vector of accumulated occupations.
- Returns:
- a reference to the vector of accumulated occupations
| const DoubleVector& alize::MixtureStat::getAccumulatedOccVect |
( |
) |
const |
| virtual String alize::MixtureStat::getClassName |
( |
) |
const [pure virtual] |
| virtual const Mixture& alize::MixtureStat::getEM |
( |
) |
[pure virtual] |
| real_t alize::MixtureStat::getEMFeatureCount |
( |
) |
const |
Returns the count of accumulated features for EM
- Returns:
- the count of accumulated features for EM
| lk_t alize::MixtureStat::getLLK |
( |
) |
const |
Returns the last log-likelihood computation stored for the mixture
- Returns:
- the log-likelihood computed between the mixture and the last feature
| lk_t alize::MixtureStat::getMeanLLK |
( |
) |
const |
Computes and returns the mean of the accumulated log-likelihood. The accumulated value is simply divided by the value of the feature counter.
- Returns:
- the mean of the accumulated log-likelihood
- Exceptions:
-
| Exception | if the mean cannot be computed (no likelihood accumulation) |
Gets a reference to the vector of mean occupations.
- Returns:
- a reference to the vector of mean occupations.
- Exceptions:
-
| Mixture& alize::MixtureStat::getMixture |
( |
) |
const |
Returns the mixture of this accumulator
- Returns:
- the mixture of this accumulator
| const DoubleVector& alize::MixtureStat::getOccVect |
( |
) |
const |
Gets a reference to the vector of occupations.
- Returns:
- a reference to the vector of occupations
| bool alize::MixtureStat::operator!= |
( |
const MixtureStat & |
) |
const [private] |
| bool alize::MixtureStat::operator== |
( |
const MixtureStat & |
) |
const [private] |
| virtual void alize::MixtureStat::resetEM |
( |
) |
[pure virtual] |
| void alize::MixtureStat::resetLLK |
( |
) |
|
Resets internal variables used to store likelihood computation results between the mixture and a feature or a set of features :
> log-likelihood between the mixture and a feature
> accumulation of log-likelihoods
> feature counter
| void alize::MixtureStat::resetOcc |
( |
) |
|
Resets internal variables used to store occupation of a feature or a set of features
| virtual String alize::MixtureStat::toString |
( |
) |
const [virtual] |
This method is frequently overridden in the derived classes. If it is not, it returns the name of the class of the object and the address of the object
- Returns:
- a description of the object
Reimplemented from alize::Object.
Friends And Related Function Documentation
friend class TestMixtureGDStat [friend] |
friend class TestMixtureGFStat [friend] |
friend class TestMixtureStat [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: