#include <FactorAnalysis.h>

Public Member Functions | |
| FactorAnalysisStat (XList &, FeatureServer &, Config &config) | |
| Constructors with XList of a string. | |
| FactorAnalysisStat (String &, FeatureServer &, Config &config) | |
| ~FactorAnalysisStat () | |
| void | computeAndAccumulateGeneralFAStats (FeatureServer &, Config &config) |
| Estimate General FA statistics N,S,F. | |
| void | computeAndAccumulateGeneralFAStats (SegCluster &, FeatureServer &, Config &config) |
| void | getXEstimate () |
| Estimate Channel factors loading. | |
| void | getYEstimate () |
| Estimate Channel factors loading. | |
| void | getUEstimate (Config &) |
| Estimate SubSpace. | |
| void | getUEstimateUnThreaded () |
| void | estimateAndInverseL (Config &) |
| Cholesky inversion of L matrices. | |
| void | estimateAndInverseLUnThreaded () |
| double | getLLK (SegCluster &, MixtureGD &, FeatureServer &, Config &) |
| Log Likelihood computations. | |
| void | substractSpeakerStats () |
| Substract stats to get X and Y estimate. | |
| void | substractChannelStats () |
| void | normalizeFeatures (FeatureServer &, Config &) |
| Feature normalization through smooth mixture transformation. | |
| void | normalizeFeatures (SegCluster &selectedSegments, FeatureServer &fs, Config &config) |
| Normalize features with a smooth mixture transformation o't=ot-sum(P(c|ot)Uc.x) | |
| void | estimateXYAndNorm (FeatureServer &, Config &) |
| High Level functions, estimate X and Y and normalize features on a segcluster of featureServer. | |
| void | estimateXYAndNorm (SegCluster &, FeatureServer &, Config &) |
| void | getUX (RealVector< double > &, String &) |
| Compute Supervectors for a file, either Ux or M+DY. | |
| void | getMplusDY (RealVector< double > &, String &) |
| void | setYFromModel (MixtureGD &, String &) |
| Return models. | |
| void | estimateXForKnownSpeaker (MixtureGD &, String &, Config &) |
| void | getTrueSpeakerModel (MixtureGD &, String &) |
| void | getSpeakerModel (MixtureGD &, String &) |
| void | getSessionModel (MixtureGD &, String &) |
| void | getFactorAnalysisModel (MixtureGD &, String &) |
| Compute Factor Analysis model to perform likelihood computation in the classical way. | |
| void | resetAcc () |
| Reset Accumulators. | |
| void | resetXY () |
| void | storeAccs () |
| Store Accumulators in temporary variables. | |
| void | restoreAccs () |
| Restore Accumulators in temporary variables. | |
| void | saveAccs (Config &config) |
| Save Accumulators on disk. | |
| void | loadAccs (Config &config) |
| Load Accumulators from disk. | |
| MixtureServer & | getMixtureServer () |
| Accessors. | |
| StatServer & | getStatServer () |
| XList & | getFileList () |
| unsigned long & | getNbEx () |
| Matrix< double > & | getU () |
| Matrix< double > & | getY () |
| Matrix< double > & | getX () |
| RealVector< double > & | getD () |
| unsigned long | getRank () |
| void | setU (Matrix< double > &U) |
| void | setX (Matrix< double > &X) |
| void | setY (Matrix< double > &Y) |
Public Attributes | |
| Translate | _ndxTable |
| Association between filename and indexes of speaker and sessions. | |
Private Member Functions | |
| void | _init (XList &, FeatureServer &, Config &) |
| Main functions to initialize values. | |
Private Attributes | |
| XList | fileList |
| unsigned long | _vsize |
| unsigned long | _mixsize |
| unsigned long | _supervsize |
| unsigned long | _rang |
| unsigned long | _nb_speakers |
| unsigned long | _nb_sent |
| double | _tau |
| Regulation factor. | |
| bool | _topGauss |
| MixtureServer | _ms |
| StatServer | _ss |
| Matrix< double > | _matX |
| Matrix< double > | _matY |
| RealVector< double > | _D |
| Matrix< double > | _matU |
| Matrix< double > | _matS_X |
| Accumulators. | |
| Matrix< double > | _matS_X_h |
| Matrix< double > | _matN |
| Matrix< double > | _matN_h |
| Matrix< double > | matcS_X |
| Copy of accumulators. | |
| Matrix< double > | matcS_X_h |
| Matrix< double > | matcN |
| Matrix< double > | matcN_h |
| RefVector< DoubleSquareMatrix > | _l_h_inv |
| Inverse of L matrices. | |
| RealVector< double > | _super_mean |
| UBM SVs. | |
| RealVector< double > | _super_invvar |
Definition at line 121 of file FactorAnalysis.h.
| FactorAnalysisStat::FactorAnalysisStat | ( | XList & | ndx, |
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) |
Constructors with XList of a string.
Definition at line 81 of file FactorAnalysis.cpp.
References _init().
| FactorAnalysisStat::FactorAnalysisStat | ( | String & | featFilename, |
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) |
Definition at line 73 of file FactorAnalysis.cpp.
References _init().
| FactorAnalysisStat::~FactorAnalysisStat | ( | ) | [inline] |
Definition at line 172 of file FactorAnalysis.h.
| void FactorAnalysisStat::_init | ( | XList & | ndx, |
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) | [private] |
Main functions to initialize values.
Definition at line 85 of file FactorAnalysis.cpp.
References _D, _l_h_inv, _matN, _matN_h, _matS_X, _matS_X_h, _matU, _matX, _matY, _mixsize, _ms, _nb_sent, _nb_speakers, _ndxTable, _rang, _super_invvar, _super_mean, _supervsize, _tau, _topGauss, _vsize, fileList, verbose, and verboseLevel.
Referenced by FactorAnalysisStat().
| void FactorAnalysisStat::computeAndAccumulateGeneralFAStats | ( | FeatureServer & | fs, |
| Config & | config | ||
| ) |
Estimate General FA statistics N,S,F.
Definition at line 163 of file FactorAnalysis.cpp.
References fileList, initializeClusters(), and verifyClusterFile().
Referenced by EigenChannel(), estimateXYAndNorm(), and TrainTargetFA().
| void FactorAnalysisStat::computeAndAccumulateGeneralFAStats | ( | SegCluster & | selectedSegments, |
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) |
Definition at line 173 of file FactorAnalysis.cpp.
References _matN, _matN_h, _matS_X, _matS_X_h, _mixsize, _ms, _ndxTable, _ss, _supervsize, _topGauss, _vsize, Translate::locNb(), Translate::sessionNb(), and verbose.
| void FactorAnalysisStat::estimateAndInverseL | ( | Config & | config ) |
Cholesky inversion of L matrices.
Definition at line 409 of file FactorAnalysis.cpp.
References estimateAndInverseLUnThreaded().
Referenced by EigenChannel(), estimateXYAndNorm(), and TrainTargetFA().
| void FactorAnalysisStat::estimateAndInverseLUnThreaded | ( | ) |
Definition at line 418 of file FactorAnalysis.cpp.
References _l_h_inv, _matN_h, _matU, _mixsize, _rang, _super_invvar, _supervsize, _vsize, fileList, and verbose.
Referenced by estimateAndInverseL().
| void FactorAnalysisStat::estimateXForKnownSpeaker | ( | MixtureGD & | M, |
| String & | file, | ||
| Config & | config | ||
| ) |
Definition at line 896 of file FactorAnalysis.cpp.
References _matU, _matX, _rang, _supervsize, getXEstimate(), modelToSv(), resetXY(), setYFromModel(), substractSpeakerStats(), svToModel(), and verbose.
| void FactorAnalysisStat::estimateXYAndNorm | ( | SegCluster & | selectedSegments, |
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) |
Definition at line 1078 of file FactorAnalysis.cpp.
References computeAndAccumulateGeneralFAStats(), estimateAndInverseL(), getXEstimate(), getYEstimate(), normalizeFeatures(), resetXY(), substractChannelStats(), substractSpeakerStats(), and verbose.
| void FactorAnalysisStat::estimateXYAndNorm | ( | FeatureServer & | fs, |
| Config & | config | ||
| ) |
High Level functions, estimate X and Y and normalize features on a segcluster of featureServer.
Definition at line 1063 of file FactorAnalysis.cpp.
References computeAndAccumulateGeneralFAStats(), estimateAndInverseL(), getXEstimate(), getYEstimate(), normalizeFeatures(), resetXY(), substractChannelStats(), substractSpeakerStats(), and verbose.
Referenced by ComputeTestFA(), and normFeatFA().
| RealVector<double>& FactorAnalysisStat::getD | ( | ) | [inline] |
Definition at line 292 of file FactorAnalysis.h.
| void FactorAnalysisStat::getFactorAnalysisModel | ( | MixtureGD & | FA, |
| String & | file | ||
| ) |
Compute Factor Analysis model to perform likelihood computation in the classical way.
Compute sigma_s
Compute sigma_s+*sigma_w
Definition at line 835 of file FactorAnalysis.cpp.
References _matN, _mixsize, _ndxTable, _tau, _vsize, getTrueSpeakerModel(), Translate::locNb(), and verbose.
Referenced by TrainTargetFA(), and verifyEMLK().
| XList& FactorAnalysisStat::getFileList | ( | ) | [inline] |
Definition at line 282 of file FactorAnalysis.h.
| double FactorAnalysisStat::getLLK | ( | SegCluster & | selectedSegments, |
| MixtureGD & | model, | ||
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) |
Log Likelihood computations.
Compute Log Likelihood of the Factor Analysis model.
Definition at line 864 of file FactorAnalysis.cpp.
Referenced by TrainTargetFA(), and verifyEMLK().
| MixtureServer& FactorAnalysisStat::getMixtureServer | ( | ) | [inline] |
Accessors.
Definition at line 278 of file FactorAnalysis.h.
| void FactorAnalysisStat::getMplusDY | ( | RealVector< double > & | Sp, |
| String & | file | ||
| ) |
Definition at line 944 of file FactorAnalysis.cpp.
References _D, _matY, _ndxTable, _super_mean, _supervsize, and Translate::locNb().
Referenced by getSpeakerModel(), getTrueSpeakerModel(), and substractSpeakerStats().
| unsigned long& FactorAnalysisStat::getNbEx | ( | ) | [inline] |
Definition at line 284 of file FactorAnalysis.h.
| unsigned long FactorAnalysisStat::getRank | ( | ) | [inline] |
Definition at line 294 of file FactorAnalysis.h.
| void FactorAnalysisStat::getSessionModel | ( | MixtureGD & | M, |
| String & | file | ||
| ) |
Definition at line 934 of file FactorAnalysis.cpp.
References _super_mean, _supervsize, getUX(), svToModel(), and verbose.
Referenced by TrainTargetFA().
| void FactorAnalysisStat::getSpeakerModel | ( | MixtureGD & | M, |
| String & | file | ||
| ) |
Definition at line 952 of file FactorAnalysis.cpp.
References _supervsize, getMplusDY(), getUX(), and svToModel().
Referenced by normalizeFeatures(), and verifyEMLK().
| StatServer& FactorAnalysisStat::getStatServer | ( | ) | [inline] |
Definition at line 280 of file FactorAnalysis.h.
| void FactorAnalysisStat::getTrueSpeakerModel | ( | MixtureGD & | M, |
| String & | file | ||
| ) |
Definition at line 926 of file FactorAnalysis.cpp.
References getMplusDY(), svToModel(), and verbose.
Referenced by getFactorAnalysisModel(), and TrainTargetFA().
| Matrix<double>& FactorAnalysisStat::getU | ( | ) | [inline] |
Definition at line 286 of file FactorAnalysis.h.
Referenced by EigenChannel().
| void FactorAnalysisStat::getUEstimate | ( | Config & | config ) |
Estimate SubSpace.
Definition at line 578 of file FactorAnalysis.cpp.
References getUEstimateUnThreaded().
Referenced by EigenChannel().
| void FactorAnalysisStat::getUEstimateUnThreaded | ( | ) |
| void FactorAnalysisStat::getUX | ( | RealVector< double > & | ux, |
| String & | file | ||
| ) |
Compute Supervectors for a file, either Ux or M+DY.
Definition at line 917 of file FactorAnalysis.cpp.
References _matU, _matX, _ndxTable, _rang, _supervsize, and Translate::sessionNb().
Referenced by getSessionModel(), getSpeakerModel(), normalizeFeatures(), and substractChannelStats().
| Matrix<double>& FactorAnalysisStat::getX | ( | ) | [inline] |
Definition at line 290 of file FactorAnalysis.h.
| void FactorAnalysisStat::getXEstimate | ( | ) |
Estimate Channel factors loading.
Definition at line 377 of file FactorAnalysis.cpp.
References _l_h_inv, _matS_X_h, _matU, _matX, _ndxTable, _rang, _super_invvar, _supervsize, fileList, Translate::sessionNb(), and verbose.
Referenced by EigenChannel(), estimateXForKnownSpeaker(), estimateXYAndNorm(), and TrainTargetFA().
| Matrix<double>& FactorAnalysisStat::getY | ( | ) | [inline] |
Definition at line 288 of file FactorAnalysis.h.
| void FactorAnalysisStat::getYEstimate | ( | ) |
Estimate Channel factors loading.
Definition at line 560 of file FactorAnalysis.cpp.
References _D, _matN, _matS_X, _matY, _nb_speakers, _super_invvar, _supervsize, _tau, _vsize, and verbose.
Referenced by EigenChannel(), estimateXYAndNorm(), and TrainTargetFA().
| void FactorAnalysisStat::loadAccs | ( | Config & | config ) | [inline] |
Load Accumulators from disk.
Definition at line 269 of file FactorAnalysis.h.
References verbose.
Referenced by EigenChannel().
| void FactorAnalysisStat::normalizeFeatures | ( | FeatureServer & | fs, |
| Config & | config | ||
| ) |
Feature normalization through smooth mixture transformation.
Definition at line 1053 of file FactorAnalysis.cpp.
References fileList, initializeClusters(), and verifyClusterFile().
Referenced by estimateXYAndNorm().
| void FactorAnalysisStat::normalizeFeatures | ( | SegCluster & | selectedSegments, |
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) |
Normalize features with a smooth mixture transformation o't=ot-sum(P(c|ot)Uc.x)
Definition at line 963 of file FactorAnalysis.cpp.
References _mixsize, _ms, _topGauss, _vsize, getSpeakerModel(), getUX(), and verbose.
| void FactorAnalysisStat::resetAcc | ( | ) | [inline] |
| void FactorAnalysisStat::resetXY | ( | ) | [inline] |
Definition at line 236 of file FactorAnalysis.h.
Referenced by estimateXForKnownSpeaker(), and estimateXYAndNorm().
| void FactorAnalysisStat::restoreAccs | ( | ) | [inline] |
Restore Accumulators in temporary variables.
Definition at line 251 of file FactorAnalysis.h.
References verbose.
Referenced by EigenChannel().
| void FactorAnalysisStat::saveAccs | ( | Config & | config ) | [inline] |
Save Accumulators on disk.
Definition at line 260 of file FactorAnalysis.h.
References verbose.
Referenced by EigenChannel().
| void FactorAnalysisStat::setU | ( | Matrix< double > & | U ) | [inline] |
Definition at line 296 of file FactorAnalysis.h.
| void FactorAnalysisStat::setX | ( | Matrix< double > & | X ) | [inline] |
Definition at line 298 of file FactorAnalysis.h.
| void FactorAnalysisStat::setY | ( | Matrix< double > & | Y ) | [inline] |
Definition at line 300 of file FactorAnalysis.h.
| void FactorAnalysisStat::setYFromModel | ( | MixtureGD & | M, |
| String & | file | ||
| ) |
Return models.
Definition at line 885 of file FactorAnalysis.cpp.
References _D, _matY, _ms, _ndxTable, Translate::locNb(), modelToSv(), and verbose.
Referenced by estimateXForKnownSpeaker().
| void FactorAnalysisStat::storeAccs | ( | ) | [inline] |
Store Accumulators in temporary variables.
Definition at line 242 of file FactorAnalysis.h.
References verbose.
Referenced by EigenChannel().
| void FactorAnalysisStat::substractChannelStats | ( | ) |
Definition at line 347 of file FactorAnalysis.cpp.
References _matN_h, _matS_X, _mixsize, _super_mean, _supervsize, _vsize, fileList, getUX(), and verbose.
Referenced by EigenChannel(), estimateXYAndNorm(), and TrainTargetFA().
| void FactorAnalysisStat::substractSpeakerStats | ( | ) |
Substract stats to get X and Y estimate.
Definition at line 322 of file FactorAnalysis.cpp.
References _matN_h, _matS_X_h, _mixsize, _supervsize, _vsize, fileList, getMplusDY(), verbose, and verboseLevel.
Referenced by EigenChannel(), estimateXForKnownSpeaker(), estimateXYAndNorm(), and TrainTargetFA().
RealVector<double> FactorAnalysisStat::_D [private] |
Definition at line 140 of file FactorAnalysis.h.
Referenced by _init(), getMplusDY(), getYEstimate(), and setYFromModel().
RefVector<DoubleSquareMatrix> FactorAnalysisStat::_l_h_inv [private] |
Inverse of L matrices.
Definition at line 156 of file FactorAnalysis.h.
Referenced by _init(), estimateAndInverseLUnThreaded(), getUEstimateUnThreaded(), and getXEstimate().
Matrix<double> FactorAnalysisStat::_matN [private] |
Definition at line 146 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), getFactorAnalysisModel(), and getYEstimate().
Matrix<double> FactorAnalysisStat::_matN_h [private] |
Definition at line 147 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), estimateAndInverseLUnThreaded(), getUEstimateUnThreaded(), substractChannelStats(), and substractSpeakerStats().
Matrix<double> FactorAnalysisStat::_matS_X [private] |
Accumulators.
Definition at line 144 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), getYEstimate(), and substractChannelStats().
Matrix<double> FactorAnalysisStat::_matS_X_h [private] |
Definition at line 145 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), getUEstimateUnThreaded(), getXEstimate(), and substractSpeakerStats().
Matrix<double> FactorAnalysisStat::_matU [private] |
Definition at line 141 of file FactorAnalysis.h.
Referenced by _init(), estimateAndInverseLUnThreaded(), estimateXForKnownSpeaker(), getUEstimateUnThreaded(), getUX(), and getXEstimate().
Matrix<double> FactorAnalysisStat::_matX [private] |
Definition at line 138 of file FactorAnalysis.h.
Referenced by _init(), estimateXForKnownSpeaker(), getUEstimateUnThreaded(), getUX(), and getXEstimate().
Matrix<double> FactorAnalysisStat::_matY [private] |
Definition at line 139 of file FactorAnalysis.h.
Referenced by _init(), getMplusDY(), getYEstimate(), and setYFromModel().
unsigned long FactorAnalysisStat::_mixsize [private] |
Definition at line 125 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), estimateAndInverseLUnThreaded(), getFactorAnalysisModel(), getUEstimateUnThreaded(), normalizeFeatures(), substractChannelStats(), and substractSpeakerStats().
MixtureServer FactorAnalysisStat::_ms [private] |
Definition at line 135 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), normalizeFeatures(), and setYFromModel().
unsigned long FactorAnalysisStat::_nb_sent [private] |
Definition at line 129 of file FactorAnalysis.h.
Referenced by _init(), and getUEstimateUnThreaded().
unsigned long FactorAnalysisStat::_nb_speakers [private] |
Definition at line 128 of file FactorAnalysis.h.
Referenced by _init(), and getYEstimate().
Association between filename and indexes of speaker and sessions.
Definition at line 167 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), getFactorAnalysisModel(), getMplusDY(), getUX(), getXEstimate(), and setYFromModel().
unsigned long FactorAnalysisStat::_rang [private] |
Definition at line 127 of file FactorAnalysis.h.
Referenced by _init(), estimateAndInverseLUnThreaded(), estimateXForKnownSpeaker(), getUEstimateUnThreaded(), getUX(), and getXEstimate().
StatServer FactorAnalysisStat::_ss [private] |
Definition at line 136 of file FactorAnalysis.h.
Referenced by computeAndAccumulateGeneralFAStats(), and getLLK().
RealVector<double> FactorAnalysisStat::_super_invvar [private] |
Definition at line 160 of file FactorAnalysis.h.
Referenced by _init(), estimateAndInverseLUnThreaded(), getXEstimate(), and getYEstimate().
RealVector<double> FactorAnalysisStat::_super_mean [private] |
UBM SVs.
Definition at line 159 of file FactorAnalysis.h.
Referenced by _init(), getMplusDY(), getSessionModel(), and substractChannelStats().
unsigned long FactorAnalysisStat::_supervsize [private] |
Definition at line 126 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), estimateAndInverseLUnThreaded(), estimateXForKnownSpeaker(), getMplusDY(), getSessionModel(), getSpeakerModel(), getUX(), getXEstimate(), getYEstimate(), substractChannelStats(), and substractSpeakerStats().
double FactorAnalysisStat::_tau [private] |
Regulation factor.
Definition at line 131 of file FactorAnalysis.h.
Referenced by _init(), getFactorAnalysisModel(), and getYEstimate().
bool FactorAnalysisStat::_topGauss [private] |
Definition at line 133 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), and normalizeFeatures().
unsigned long FactorAnalysisStat::_vsize [private] |
Definition at line 124 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), estimateAndInverseLUnThreaded(), getFactorAnalysisModel(), getUEstimateUnThreaded(), getYEstimate(), normalizeFeatures(), substractChannelStats(), and substractSpeakerStats().
XList FactorAnalysisStat::fileList [private] |
Definition at line 123 of file FactorAnalysis.h.
Referenced by _init(), computeAndAccumulateGeneralFAStats(), estimateAndInverseLUnThreaded(), getXEstimate(), normalizeFeatures(), substractChannelStats(), and substractSpeakerStats().
Matrix<double> FactorAnalysisStat::matcN [private] |
Definition at line 152 of file FactorAnalysis.h.
Matrix<double> FactorAnalysisStat::matcN_h [private] |
Definition at line 153 of file FactorAnalysis.h.
Matrix<double> FactorAnalysisStat::matcS_X [private] |
Copy of accumulators.
Definition at line 150 of file FactorAnalysis.h.
Matrix<double> FactorAnalysisStat::matcS_X_h [private] |
Definition at line 151 of file FactorAnalysis.h.
1.7.2