Definition for Gaussian Mixture Model with diagonal covariances in normal mode: where the parameters are stored as means and variances (instead of the exponential form that the DiagGmm class is stored as). More...
#include <diag-gmm-normal.h>
Public Member Functions | |
DiagGmmNormal () | |
Empty constructor. More... | |
DiagGmmNormal (const DiagGmm &gmm) | |
void | Resize (int32 nMix, int32 dim) |
Resizes arrays to this dim. Does not initialize data. More... | |
void | CopyFromDiagGmm (const DiagGmm &diaggmm) |
Copies from given DiagGmm. More... | |
void | CopyToDiagGmm (DiagGmm *diaggmm, GmmFlagsType flags=kGmmAll) const |
Copies to DiagGmm the requested parameters. More... | |
int32 | NumGauss () |
int32 | Dim () |
KALDI_DISALLOW_COPY_AND_ASSIGN (DiagGmmNormal) | |
Public Attributes | |
Vector< double > | weights_ |
weights (not log). More... | |
Matrix< double > | means_ |
Means. More... | |
Matrix< double > | vars_ |
diagonal variance More... | |
Definition for Gaussian Mixture Model with diagonal covariances in normal mode: where the parameters are stored as means and variances (instead of the exponential form that the DiagGmm class is stored as).
This class will be used in the update (since the update formulas are for the standard parameterization) and then copied to the exponential form of the DiagGmm class. The DiagGmmNormal class will not be used anywhere else, and should not have any extra methods that are not needed.
Definition at line 45 of file diag-gmm-normal.h.
|
inline |
|
inlineexplicit |
Definition at line 50 of file diag-gmm-normal.h.
References DiagGmmNormal::CopyFromDiagGmm(), DiagGmmNormal::CopyToDiagGmm(), kaldi::kGmmAll, and DiagGmmNormal::Resize().
void CopyFromDiagGmm | ( | const DiagGmm & | diaggmm | ) |
Copies from given DiagGmm.
Definition at line 46 of file diag-gmm-normal.cc.
References MatrixBase< Real >::CopyFromMat(), VectorBase< Real >::CopyFromVec(), DiagGmm::Dim(), DiagGmm::inv_vars_, MatrixBase< Real >::InvertElements(), DiagGmmNormal::means_, DiagGmm::means_invvars_, MatrixBase< Real >::MulElements(), DiagGmmNormal::Resize(), DiagGmmNormal::vars_, DiagGmmNormal::weights_, and DiagGmm::weights_.
Referenced by DiagGmmNormal::DiagGmmNormal(), kaldi::UpdateEbwDiagGmm(), and kaldi::UpdateEbwWeightsDiagGmm().
void CopyToDiagGmm | ( | DiagGmm * | diaggmm, |
GmmFlagsType | flags = kGmmAll |
||
) | const |
Copies to DiagGmm the requested parameters.
Definition at line 57 of file diag-gmm-normal.cc.
References MatrixBase< Real >::CopyFromMat(), VectorBase< Real >::Dim(), DiagGmm::Dim(), DiagGmm::inv_vars_, MatrixBase< Real >::InvertElements(), KALDI_ASSERT, kaldi::kGmmMeans, kaldi::kGmmVariances, kaldi::kGmmWeights, DiagGmmNormal::means_, DiagGmm::means_invvars_, MatrixBase< Real >::MulElements(), MatrixBase< Real >::NumCols(), DiagGmm::valid_gconsts_, DiagGmmNormal::vars_, DiagGmmNormal::weights_, and DiagGmm::weights_.
Referenced by DiagGmm::CopyFromNormal(), DiagGmmNormal::DiagGmmNormal(), kaldi::DoRescalingUpdate(), kaldi::MapDiagGmmUpdate(), kaldi::MleDiagGmmUpdate(), UnitTestEstimateDiagGmm(), kaldi::UpdateEbwDiagGmm(), and kaldi::UpdateEbwWeightsDiagGmm().
|
inline |
Definition at line 64 of file diag-gmm-normal.h.
References DiagGmmNormal::means_, and MatrixBase< Real >::NumCols().
KALDI_DISALLOW_COPY_AND_ASSIGN | ( | DiagGmmNormal | ) |
|
inline |
Definition at line 63 of file diag-gmm-normal.h.
References VectorBase< Real >::Dim(), and DiagGmmNormal::weights_.
Referenced by Fmpe::ComputeC().
Resizes arrays to this dim. Does not initialize data.
Definition at line 31 of file diag-gmm-normal.cc.
References VectorBase< Real >::Dim(), KALDI_ASSERT, DiagGmmNormal::means_, MatrixBase< Real >::NumCols(), MatrixBase< Real >::NumRows(), Vector< Real >::Resize(), Matrix< Real >::Resize(), DiagGmmNormal::vars_, and DiagGmmNormal::weights_.
Referenced by DiagGmmNormal::CopyFromDiagGmm(), and DiagGmmNormal::DiagGmmNormal().
Matrix<double> means_ |
Means.
Definition at line 67 of file diag-gmm-normal.h.
Referenced by Fmpe::ComputeC(), DiagGmmNormal::CopyFromDiagGmm(), DiagGmmNormal::CopyToDiagGmm(), kaldi::DiagGmmToStats(), DiagGmmNormal::Dim(), kaldi::DoRescalingUpdate(), kaldi::GetStatsDerivative(), kaldi::InitGmmFromRandomFrames(), DiagGmm::Interpolate(), kaldi::MapDiagGmmUpdate(), kaldi::MleDiagGmmUpdate(), DiagGmmNormal::Resize(), UnitTestEstimateDiagGmm(), and kaldi::UpdateEbwDiagGmm().
Matrix<double> vars_ |
diagonal variance
Definition at line 68 of file diag-gmm-normal.h.
Referenced by Fmpe::ComputeC(), DiagGmmNormal::CopyFromDiagGmm(), DiagGmmNormal::CopyToDiagGmm(), kaldi::DiagGmmToStats(), kaldi::DoRescalingUpdate(), kaldi::GetStatsDerivative(), kaldi::InitGmmFromRandomFrames(), DiagGmm::Interpolate(), kaldi::MapDiagGmmUpdate(), kaldi::MleDiagGmmUpdate(), DiagGmmNormal::Resize(), UnitTestEstimateDiagGmm(), and kaldi::UpdateEbwDiagGmm().
Vector<double> weights_ |
weights (not log).
Definition at line 66 of file diag-gmm-normal.h.
Referenced by Fmpe::ComputeC(), DiagGmmNormal::CopyFromDiagGmm(), DiagGmmNormal::CopyToDiagGmm(), kaldi::DiagGmmToStats(), kaldi::InitGmmFromRandomFrames(), DiagGmm::Interpolate(), kaldi::MapDiagGmmUpdate(), kaldi::MleDiagGmmUpdate(), DiagGmmNormal::NumGauss(), DiagGmmNormal::Resize(), and kaldi::UpdateEbwWeightsDiagGmm().