Go to the source code of this file.
Functions | |
void | rand_posdef_spmatrix (size_t dim, SpMatrix< BaseFloat > *matrix, TpMatrix< BaseFloat > *matrix_sqrt=NULL, BaseFloat *logdet=NULL) |
void | test_io (const LdaEstimate &lda_est, bool binary) |
void | UnitTestEstimateLda () |
int | main () |
int main | ( | ) |
Definition at line 207 of file lda-estimate-test.cc.
References rnnlm::i, and UnitTestEstimateLda().
void rand_posdef_spmatrix | ( | size_t | dim, |
SpMatrix< BaseFloat > * | matrix, | ||
TpMatrix< BaseFloat > * | matrix_sqrt = NULL , |
||
BaseFloat * | logdet = NULL |
||
) |
Definition at line 25 of file lda-estimate-test.cc.
References SpMatrix< Real >::AddMat2(), TpMatrix< Real >::Cholesky(), MatrixBase< Real >::Cond(), kaldi::kNoTrans, SpMatrix< Real >::LogPosDefDet(), and MatrixBase< Real >::SetRandn().
Referenced by UnitTestEstimateLda().
void test_io | ( | const LdaEstimate & | lda_est, |
bool | binary | ||
) |
Definition at line 49 of file lda-estimate-test.cc.
References MatrixBase< Real >::AddMat(), LdaEstimateOptions::dim, LdaEstimate::Dim(), LdaEstimate::Estimate(), LdaEstimate::Init(), MatrixBase< Real >::IsZero(), KALDI_ASSERT, kaldi::kNoTrans, LdaEstimate::NumClasses(), LdaEstimate::Read(), LdaEstimate::Scale(), Input::Stream(), and LdaEstimate::Write().
Referenced by UnitTestEstimateLda().
void UnitTestEstimateLda | ( | ) |
Definition at line 85 of file lda-estimate-test.cc.
References LdaEstimate::Accumulate(), MatrixBase< Real >::AddMatMatMat(), VectorBase< Real >::AddMatVec(), SpMatrix< Real >::AddSp(), VectorBase< Real >::AddVec(), SpMatrix< Real >::AddVec2(), VectorBase< Real >::CopyFromVec(), rnnlm::d, LdaEstimateOptions::dim, VectorBase< Real >::Dim(), LdaEstimate::Estimate(), rnnlm::i, LdaEstimate::Init(), MatrixBase< Real >::IsDiagonal(), MatrixBase< Real >::IsUnit(), KALDI_ASSERT, kaldi::kCopyData, kaldi::kNoTrans, kaldi::kTrans, rand_posdef_spmatrix(), kaldi::RandGauss(), kaldi::RandInt(), LdaEstimateOptions::remove_offset, Vector< Real >::Resize(), MatrixBase< Real >::Row(), PackedMatrix< Real >::Scale(), VectorBase< Real >::Scale(), test_io(), and LdaEstimate::ZeroAccumulators().
Referenced by main().