#include <get-feature-transform.h>


Public Member Functions | |
| void | Estimate (const FeatureTransformEstimateOptions &opts, const std::vector< std::vector< int32 > > &indexes, Matrix< BaseFloat > *M) const |
| This is as FeatureTransformEstimate, but for use in nnet-get-feature-transform-multi.cc, see the usage message of that program for a description of what it does. More... | |
Public Member Functions inherited from FeatureTransformEstimate | |
| void | Estimate (const FeatureTransformEstimateOptions &opts, Matrix< BaseFloat > *M, TpMatrix< BaseFloat > *within_cholesky) const |
| Estimates the LDA transform matrix m. More... | |
Public Member Functions inherited from LdaEstimate | |
| LdaEstimate () | |
| void | Init (int32 num_classes, int32 dimension) |
| Allocates memory for accumulators. More... | |
| int32 | NumClasses () const |
| Returns the number of classes. More... | |
| int32 | Dim () const |
| Returns the dimensionality of the feature vectors. More... | |
| void | ZeroAccumulators () |
| Sets all accumulators to zero. More... | |
| void | Scale (BaseFloat f) |
| Scales all accumulators. More... | |
| double | TotCount () |
| Return total count of the data. More... | |
| void | Accumulate (const VectorBase< BaseFloat > &data, int32 class_id, BaseFloat weight=1.0) |
| Accumulates data. More... | |
| void | Estimate (const LdaEstimateOptions &opts, Matrix< BaseFloat > *M, Matrix< BaseFloat > *Mfull=NULL) const |
| Estimates the LDA transform matrix m. More... | |
| void | Read (std::istream &in_stream, bool binary, bool add) |
| void | Write (std::ostream &out_stream, bool binary) const |
Private Member Functions | |
| void | EstimateTransformPart (const FeatureTransformEstimateOptions &opts, const std::vector< int32 > &indexes, const SpMatrix< double > &total_covar, const SpMatrix< double > &between_covar, const Vector< double > &mean, Matrix< BaseFloat > *M) const |
Additional Inherited Members | |
Protected Member Functions inherited from LdaEstimate | |
| void | GetStats (SpMatrix< double > *total_covar, SpMatrix< double > *between_covar, Vector< double > *total_mean, double *sum) const |
| Extract a more processed form of the stats. More... | |
| LdaEstimate & | operator= (const LdaEstimate &other) |
Static Protected Member Functions inherited from FeatureTransformEstimate | |
| static void | EstimateInternal (const FeatureTransformEstimateOptions &opts, const SpMatrix< double > &total_covar, const SpMatrix< double > &between_covar, const Vector< double > &mean, Matrix< BaseFloat > *M, TpMatrix< BaseFloat > *C) |
Static Protected Member Functions inherited from LdaEstimate | |
| static void | AddMeanOffset (const VectorBase< double > &total_mean, Matrix< BaseFloat > *projection) |
| This function modifies the LDA matrix so that it also subtracts the mean feature value. More... | |
Protected Attributes inherited from LdaEstimate | |
| Vector< double > | zero_acc_ |
| Matrix< double > | first_acc_ |
| SpMatrix< double > | total_second_acc_ |
Definition at line 157 of file get-feature-transform.h.
| void Estimate | ( | const FeatureTransformEstimateOptions & | opts, |
| const std::vector< std::vector< int32 > > & | indexes, | ||
| Matrix< BaseFloat > * | M | ||
| ) | const |
This is as FeatureTransformEstimate, but for use in nnet-get-feature-transform-multi.cc, see the usage message of that program for a description of what it does.
Definition at line 165 of file get-feature-transform.cc.
References count, LdaEstimate::Dim(), LdaEstimate::GetStats(), rnnlm::i, kaldi::IsSortedAndUniq(), KALDI_ASSERT, MatrixBase< Real >::NumCols(), MatrixBase< Real >::Range(), FeatureTransformEstimateOptions::remove_offset, and Matrix< Real >::Resize().
Referenced by main().
|
private |
Definition at line 130 of file get-feature-transform.cc.
References SpMatrix< Real >::AddMat2Sp(), MatrixBase< Real >::AddMatMat(), VectorBase< Real >::AddMatVec(), FeatureTransformEstimateOptions::dim, LdaEstimate::Dim(), FeatureTransformEstimate::EstimateInternal(), rnnlm::i, kaldi::kCopyData, kaldi::kNoTrans, MatrixBase< Real >::NumCols(), and Matrix< Real >::Resize().