Functions | |
void | RandPosdefSpMatrix (int32 dim, SpMatrix< BaseFloat > *matrix, TpMatrix< BaseFloat > *matrix_sqrt, BaseFloat *logdet) |
void | RandDiagGaussFeatures (int32 num_samples, const VectorBase< BaseFloat > &mean, const VectorBase< BaseFloat > &sqrt_var, MatrixBase< BaseFloat > *feats) |
void | RandFullGaussFeatures (int32 num_samples, const VectorBase< BaseFloat > &mean, const TpMatrix< BaseFloat > &sqrt_var, MatrixBase< BaseFloat > *feats) |
void | InitRandDiagGmm (int32 dim, int32 num_comp, DiagGmm *gmm) |
void | InitRandFullGmm (int32 dim, int32 num_comp, FullGmm *gmm) |
Definition at line 91 of file model-test-common.cc.
References DiagGmm::ComputeGconsts(), rnnlm::d, kaldi::Exp(), kaldi::RandGauss(), DiagGmm::Resize(), VectorBase< Real >::Scale(), DiagGmm::SetInvVarsAndMeans(), DiagGmm::SetWeights(), and VectorBase< Real >::Sum().
Referenced by kaldi::TestFmpe(), TestMllrAccsIO(), UnitTestAmDiagGmm(), UnitTestMleAmDiagGmm(), and UnitTestRegtreeMllrDiagGmm().
Definition at line 110 of file model-test-common.cc.
References FullGmm::ComputeGconsts(), rnnlm::d, kaldi::RandGauss(), RandPosdefSpMatrix(), kaldi::RandUniform(), FullGmm::Resize(), VectorBase< Real >::Scale(), FullGmm::SetInvCovarsAndMeans(), and FullGmm::SetWeights().
Referenced by TestSgmm2Fmllr(), UnitTestEstimateSgmm2(), UnitTestFullGmmEst(), kaldi::UnitTestIvectorExtractor(), and UnitTestSgmm2().
void RandDiagGaussFeatures | ( | int32 | num_samples, |
const VectorBase< BaseFloat > & | mean, | ||
const VectorBase< BaseFloat > & | sqrt_var, | ||
MatrixBase< BaseFloat > * | feats | ||
) |
Definition at line 52 of file model-test-common.cc.
References rnnlm::d, VectorBase< Real >::Dim(), KALDI_ASSERT, MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), kaldi::RandGauss(), and MatrixBase< Real >::Row().
Referenced by TestSgmm2Fmllr(), UnitTestEstimateSgmm2(), and UnitTestMleAmDiagGmm().
void RandFullGaussFeatures | ( | int32 | num_samples, |
const VectorBase< BaseFloat > & | mean, | ||
const TpMatrix< BaseFloat > & | sqrt_var, | ||
MatrixBase< BaseFloat > * | feats | ||
) |
Definition at line 72 of file model-test-common.cc.
References rnnlm::d, VectorBase< Real >::Dim(), KALDI_ASSERT, kaldi::kNoTrans, MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), PackedMatrix< Real >::NumRows(), kaldi::RandGauss(), and MatrixBase< Real >::Row().
void RandPosdefSpMatrix | ( | int32 | dim, |
SpMatrix< BaseFloat > * | matrix, | ||
TpMatrix< BaseFloat > * | matrix_sqrt, | ||
BaseFloat * | logdet | ||
) |
Definition at line 30 of file model-test-common.cc.
References SpMatrix< Real >::AddMat2(), TpMatrix< Real >::Cholesky(), MatrixBase< Real >::Cond(), KALDI_LOG, kaldi::kNoTrans, SpMatrix< Real >::LogPosDefDet(), and MatrixBase< Real >::SetRandn().
Referenced by InitRandFullGmm().