22 #ifndef KALDI_GMM_MLE_FULL_GMM_H_ 23 #define KALDI_GMM_MLE_FULL_GMM_H_ 50 min_gaussian_weight = 1.0e-05;
51 min_gaussian_occupancy = 100.0;
52 variance_floor = 0.001;
53 max_condition = 1.0e+04;
54 remove_low_count_gaussians =
true;
57 std::string module =
"MleFullGmmOptions: ";
58 opts->
Register(
"min-gaussian-weight", &min_gaussian_weight,
59 module+
"Min Gaussian weight before we remove it.");
60 opts->
Register(
"min-gaussian-occupancy", &min_gaussian_occupancy,
61 module+
"Minimum count before we remove a Gaussian.");
62 opts->
Register(
"variance-floor", &variance_floor,
63 module+
"Minimum eigenvalue of covariance matrix.");
64 opts->
Register(
"max-condition", &max_condition,
65 module+
"Maximum condition number of covariance matrix (use it to floor).");
66 opts->
Register(
"remove-low-count-gaussians", &remove_low_count_gaussians,
67 module+
"If true, remove Gaussians that fall below the floors.");
78 dim_(0), num_comp_(0), flags_(0) {
79 Resize(num_comp, dim, flags);
87 void Read(std::istream &in_stream,
bool binary,
bool add);
88 void Write(std::ostream &out_stream,
bool binary)
const;
95 void ResizeVarAccumulator(
int32 num_comp,
int32 dim);
160 #endif // KALDI_GMM_MLE_FULL_GMM_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
AccumFullGmm(int32 num_comp, int32 dim, GmmFlagsType flags)
int32 NumGauss() const
Returns the number of mixture components.
const std::vector< SpMatrix< double > > & covariance_accumulator() const
std::vector< SpMatrix< double > > covariance_accumulator_
int32 Dim() const
Returns the dimensionality of the Gaussian mean vectors.
Configuration variables like variance floor, minimum occupancy, etc.
Definition for Gaussian Mixture Model with full covariances.
BaseFloat MlObjective(const DiagGmm &gmm, const AccumDiagGmm &diag_gmm_acc)
Calc using the DiagGMM exponential form.
Vector< double > occupancy_
int32 Dim() const
Returns the dimensionality of the feature vectors.
uint16 GmmFlagsType
Bitwise OR of the above flags.
GmmFlagsType Flags() const
Accessors.
const Vector< double > & occupancy() const
BaseFloat variance_floor
Floor on eigenvalues of covariance matrices.
virtual void Register(const std::string &name, bool *ptr, const std::string &doc)=0
void Resize(int32 num_components, int32 dim, GmmFlagsType flags)
Allocates memory for accumulators.
BaseFloat min_gaussian_weight
Minimum weight below which a Gaussian is removed.
void Register(OptionsItf *opts)
AccumFullGmm(const FullGmm &gmm, GmmFlagsType flags)
bool remove_low_count_gaussians
void MleFullGmmUpdate(const MleFullGmmOptions &config, const AccumFullGmm &fullgmm_acc, GmmFlagsType flags, FullGmm *gmm, BaseFloat *obj_change_out, BaseFloat *count_out)
for computing the maximum-likelihood estimates of the parameters of a Gaussian mixture model...
Class for computing the maximum-likelihood estimates of the parameters of a Gaussian mixture model...
int32 NumGauss() const
Returns the number of mixture components in the GMM.
const Matrix< double > & mean_accumulator() const
BaseFloat min_gaussian_occupancy
Minimum occupancy count below which a Gaussian is removed.
Definition for Gaussian Mixture Model with diagonal covariances.
BaseFloat max_condition
Maximum condition number of covariance matrices (apply floor to eigenvalues if they pass this)...
Provides a vector abstraction class.
Matrix< double > mean_accumulator_