#include <StatServer.h>


This class is used to compute all the statistics needed for models training and adapting algorithms as well as for decoding algorithms.
Definition at line 104 of file StatServer.h.
| alize::StatServer::StatServer | ( | const Config & | c ) | [explicit] |
Creates a StatServer object with a specific configuration
| c | configuration of the server The server stores a pointer to the configuration. |
| alize::StatServer::StatServer | ( | const Config & | c, |
| MixtureServer & | ms | ||
| ) | [explicit] |
Creates a StatServer object with a specific configuration
| c | configuration of the server The server stores a pointer to the configuration. |
| ms | a mixture server. |
| virtual alize::StatServer::~StatServer | ( | ) | [virtual] |
| alize::StatServer::StatServer | ( | const StatServer & | ) | [private] |
internal use
| void alize::StatServer::computeAllDistribLK | ( | const Feature & | f ) |
Computes the log-likelihood between ALL the distributions of the server and the feature. The results are store in an array.
That is useful when many distributions are shared by mixtures. The log-likelihood is just computed once for each distribution.
| f | the feature |
| lk_t alize::StatServer::computeAndAccumulateLLK | ( | const Mixture & | m, |
| const Feature & | f, | ||
| const TopDistribsAction & | a = TOP_DISTRIBS_NO_ACTION |
||
| ) |
***** DEPRECATED *****
Like computeLLK() and, in addition, accumulate the log-likelihood. The internal feature counter increases by 1.
| m | the mixture |
| f | the feature |
| a | flag used to deal with top distributions |
| Exception | if the dimension of the mixture is not equals to the dimension of the feature |
| lk_t alize::StatServer::computeAndAccumulateLLK | ( | const Mixture & | m, |
| const Feature & | f, | ||
| double | w, | ||
| const TopDistribsAction & | a = TOP_DISTRIBS_NO_ACTION |
||
| ) |
***** DEPRECATED *****
Like computeLLK() and, in addition, accumulate the log-likelihood. The internal feature counter increases by w.
| m | the mixture |
| f | the feature |
| w | the weight of the feature |
| a | flag used to deal with top distributions |
| Exception | if the dimension of the mixture is not equals to the dimension of the feature |
Computes log-likelihood between a mixture and a feature
| m | the mixture |
| f | the feature |
Referenced by alize::ViterbiAccum::computeStateLLK().
| lk_t alize::StatServer::computeLLK | ( | const K & | , |
| const Mixture & | m, | ||
| const Feature & | f, | ||
| const TopDistribsAction & | a | ||
| ) |
| lk_t alize::StatServer::computeLLK | ( | const K & | , |
| const Mixture & | m, | ||
| const Feature & | f, | ||
| const LKVector & | lkVect | ||
| ) |
| lk_t alize::StatServer::computeLLK | ( | const Mixture & | m, |
| const Feature & | f, | ||
| unsigned long | idx | ||
| ) | const |
Computes log-likelihood between a mixture and a single parameter of a feature
| m | the mixture |
| f | the feature |
| idx | index of the parameter of the feature |
| MixtureGDStat& alize::StatServer::createAndStoreMixtureGDStat | ( | Mixture & | m ) |
Creates, stores in the server and returns an accumulator of statistics for a GD mixture
| m | the GD mixture |
| Exception | if m type is not GD |
| MixtureGFStat& alize::StatServer::createAndStoreMixtureGFStat | ( | Mixture & | m ) |
Creates, stores in the server and returns an accumulator of statistics for a GF mixture
| m | the GF mixture |
| Exception | if m type is not GF |
| MixtureStat& alize::StatServer::createAndStoreMixtureStat | ( | const Mixture & | m ) |
Creates, stores in the server and returns an accumulator of statistics for a generic mixture
| m | the mixture |
| MixtureGFStat& alize::StatServer::createAndStoreMixtureStat | ( | MixtureGF & | m ) |
Creates, stores in the server and returns an accumulator of statistics for a GF mixture
| m | the GF mixture |
| MixtureGDStat& alize::StatServer::createAndStoreMixtureStat | ( | MixtureGD & | m ) |
Creates, stores in the server and returns an accumulator of statistics for a GD mixture
| m | the GD mixture |
| static FrameAccGD alize::StatServer::createFrameAccGD | ( | ) | [static] |
Returns a FrameAccGD object. The objet is not stored inside the server
| static FrameAccGF alize::StatServer::createFrameAccGF | ( | ) | [static] |
Returns a FrameAccGF object. The objet is not stored inside the server
| ViterbiAccum& alize::StatServer::createViterbiAccum | ( | ) |
Creates and stores a ViterbiAccum object in a pool of objects inside the server.
| void alize::StatServer::deleteAllMixtureStat | ( | ) |
Deletes all mixture acumulators
| void alize::StatServer::deleteMixtureStat | ( | MixtureStat & | m ) |
Deletes a mixture acumulator
| m | the accumulator |
| void alize::StatServer::deleteMixtureStat | ( | unsigned long | begin, |
| unsigned long | end | ||
| ) |
Deletes a mixture acumulator
| begin | index of the first accumulator |
| end | index of the last accumulator |
| alize::StatServer::DEPRECATED | ( | lk_t | getLLKconst Mixture &m ) |
***** DEPRECATED *****
Returns the last log-likelihood computation stored for a mixture
| m | the mixture |
| alize::StatServer::DEPRECATED | ( | real_t | computeAndAccumulateOccconst Mixture &m, const Feature &f ) |
***** DEPRECATED *****
Computes and accumulates occupation of a feature
| f | the feature |
| m | the mixture |
| alize::StatServer::DEPRECATED | ( | occ_t * | getMeanOccVectconst Mixture &m ) |
***** DEPRECATED *****
Gets a pointer to the vector of mean occupations.
| m | the mixture |
| Exception | if no occ accumulated |
| alize::StatServer::DEPRECATED | ( | occ_t * | getAccumulatedOccVectconst Mixture &m ) |
***** DEPRECATED *****
Gets a pointer to the vector of accumulated occupations.
| m | the mixture |
| Exception | if no occ accumulated |
| alize::StatServer::DEPRECATED | ( | occ_t | getAccumulatedOccconst Mixture &m ) |
***** DEPRECATED *****
Computes and return the sum of accumulated occupations
| m | the mixture |
| alize::StatServer::DEPRECATED | ( | void | resetEMconst Mixture &m ) |
***** DEPRECATED *****
Reset all internal variables used for EM computation
| m | the mixture |
| alize::StatServer::DEPRECATED | ( | occ_t | computeAndAccumulateEMconst Mixture &m, const Feature & ) |
| alize::StatServer::DEPRECATED | ( | const Mixture & | getEMconst Mixture &m ) |
***** DEPRECATED *****
Gets the result of EM accumulation.
| m | the mixture |
| Exception | if resetEm() have not been called beforehand |
| alize::StatServer::DEPRECATED | ( | void | accumulateLLKconst Mixture &m, double l, double w=1.0 ) |
***** DEPRECATED *****
Accumulates the log-likelihood.
Increase internal feature counter by w
| m | the mixture |
| l | the value to accumulate |
| w | the weight (0...1) |
| alize::StatServer::DEPRECATED | ( | real_t | getAccumulatedOccFeatureCountconst Mixture &m ) |
***** DEPRECATED *****
Returns the count of accumulated features for occupation
| m | the mixture |
| alize::StatServer::DEPRECATED | ( | lk_t | computeAndAccumulateLLKconst Mixture &m ) |
***** DEPRECATED *****
Like computeAndAccumulateLLK(Mixture& mix, const Feature& f) but using the internal precalculated log-likelihood array.
| m | the mixture |
| Exception | if no mixture server is connected to this stat server (the log-likelihood array is not computed) |
| alize::StatServer::DEPRECATED | ( | void | resetOccconst Mixture &m ) |
***** DEPRECATED *****
Resets internal variables used to store occupation of a feature or a set of features :
> log-likelihood between the mixture and a feature
> accumulation of log-likelihoods
> feature counter
| m | the mixture |
| virtual String alize::StatServer::getClassName | ( | ) | const [virtual] |
Returns the name of the class
Implements alize::Object.
| const DoubleVector& alize::StatServer::getDistribLKVector | ( | const K & | ) | const |
***** DEPRECATED *****
Computes and returns the mean of the accumulated log-likelihood. The accumulated value is simply divided by the value of the feature counter.
| m | the mixture |
| Exception | if the mean cannot be computed (no likelihood accumulation) |
| MixtureGDStat& alize::StatServer::getMixtureGDStat | ( | unsigned long | idx ) |
Returns the mixture GD accumulator with index i
| i | the index |
| MixtureGFStat& alize::StatServer::getMixtureGFStat | ( | unsigned long | idx ) |
Returns the mixture GF accumulator with index i
| idx | the index |
| MixtureStat& alize::StatServer::getMixtureStat | ( | unsigned long | idx ) |
Returns the generic mixture accumulator with index i
| idx | the index |
| MixtureStat& alize::StatServer::getMixtureStat | ( | const Mixture & | m ) | [private] |
| m |
| unsigned long alize::StatServer::getMixtureStatCount | ( | ) | const |
Returns the count of mixture accumulators stored in the server
| unsigned long alize::StatServer::getMixtureStatIndex | ( | MixtureStat & | m ) | const |
Returns the index of a MixtureStat object
| m | the MixtureStat object |
| Exception | if m cannot be found in the server |
| const String& alize::StatServer::getServerName | ( | ) | const |
| const LKVector& alize::StatServer::getTopDistribIndexVector | ( | ) | const |
Returns the best distributions index vector defined after calling computeAndAccumulateLLK(...)
| bool alize::StatServer::operator!= | ( | const StatServer & | ) | const [private] |
Not implemented
| const StatServer& alize::StatServer::operator= | ( | const StatServer & | ) | [private] |
Not implemented
| bool alize::StatServer::operator== | ( | const StatServer & | ) | const [private] |
Not implemented
| void alize::StatServer::reset | ( | ) |
Resets the server. Delete all temporary objects.
| void alize::StatServer::resetLLK | ( | const Mixture & | m ) |
***** DEPRECATED *****
Resets internal variables used to store likelihood computation results between a mixture and a feature or a set of features :
> log-likelihood between the mixture and a feature
> accumulation of log-likelihoods
> feature counter
| m | the mixture |
| void alize::StatServer::setServerName | ( | const String & | s ) |
| void alize::StatServer::setTopDistribIndexVector | ( | const ULongVector & | indexVect, |
| real_t | sumNonTopDistribWeights, | ||
| real_t | sumNonTopDistribLK | ||
| ) |
Sets indexes of internal top distrib vector
| indexVect | vector of indexes |
| sumNonTopDistribWeights | |
| sumNonTopDistribLK |
| virtual String alize::StatServer::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
Reimplemented from alize::Object.
friend class TestMixtureGDStat [friend] |
Definition at line 107 of file StatServer.h.
friend class TestStatServer [friend] |
Definition at line 106 of file StatServer.h.
const Config& alize::StatServer::_config [private] |
Definition at line 454 of file StatServer.h.
Definition at line 455 of file StatServer.h.
const lk_t alize::StatServer::_maxLLK [private] |
Definition at line 463 of file StatServer.h.
const lk_t alize::StatServer::_minLLK [private] |
Definition at line 462 of file StatServer.h.
Definition at line 457 of file StatServer.h.
const Mixture* alize::StatServer::_pLastMixture [private] |
Definition at line 459 of file StatServer.h.
MixtureStat* alize::StatServer::_pLastMixtureStat [private] |
Definition at line 460 of file StatServer.h.
MixtureServer* alize::StatServer::_pMixtureServer [private] |
Definition at line 456 of file StatServer.h.
String alize::StatServer::_serverName [private] |
Definition at line 453 of file StatServer.h.
LKVector alize::StatServer::_topDistribsVect [private] |
Definition at line 461 of file StatServer.h.
Definition at line 458 of file StatServer.h.
1.7.2