Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

FactorAnalysisStat Class Reference

#include <FactorAnalysis.h>

Collaboration diagram for FactorAnalysisStat:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Definition at line 121 of file FactorAnalysis.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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 
)
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 
)
void FactorAnalysisStat::estimateXYAndNorm ( SegCluster &  selectedSegments,
FeatureServer &  fs,
Config &  config 
)
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.

References _ss, and verbose.

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 
)
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 (  )

Definition at line 587 of file FactorAnalysis.cpp.

References _l_h_inv, _matN_h, _matS_X_h, _matU, _matX, _mixsize, _nb_sent, _rang, _vsize, and verbose.

Referenced by getUEstimate().

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 (  )
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]

Reset Accumulators.

Definition at line 229 of file FactorAnalysis.h.

References verbose.

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 (  )
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().


Member Data Documentation

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]
Matrix<double> FactorAnalysisStat::_matN_h [private]
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]
Matrix<double> FactorAnalysisStat::_matU [private]
Matrix<double> FactorAnalysisStat::_matX [private]
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]
MixtureServer FactorAnalysisStat::_ms [private]
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]
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]
double FactorAnalysisStat::_tau [private]

Regulation factor.

Definition at line 131 of file FactorAnalysis.h.

Referenced by _init(), getFactorAnalysisModel(), and getYEstimate().

Definition at line 133 of file FactorAnalysis.h.

Referenced by _init(), computeAndAccumulateGeneralFAStats(), and normalizeFeatures().

unsigned long FactorAnalysisStat::_vsize [private]
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.


The documentation for this class was generated from the following files: