Generic Mixture of Gaussians (MOG) class. Used as a base for other MOG classes. More...
#include <itpp/stat/mog_generic.h>
Public Member Functions | |
MOG_generic () | |
Default constructor. | |
MOG_generic (const std::string &name_in) | |
Construct the MOG_generic object by loading the parameters from a model file. | |
MOG_generic (const int &K_in, const int &D_in, bool full_in=false) | |
construct a default model (all Gaussians have zero mean and unit variance for all dimensions) | |
MOG_generic (Array< vec > &means_in, bool full_in=false) | |
Construct a model using user supplied mean vectors. | |
MOG_generic (Array< vec > &means_in, Array< vec > &diag_covs_in, vec &weights_in) | |
Construct a model using user supplied parameters (diagonal covariance version) | |
MOG_generic (Array< vec > &means_in, Array< mat > &full_covs_in, vec &weights_in) | |
Construct a model using user supplied parameters (full covariance version) | |
virtual | ~MOG_generic () |
Default destructor. | |
void | init () |
Initialise the model to be empty. | |
void | init (const int &K_in, const int &D_in, bool full_in=false) |
initialise the model so that all Gaussians have zero mean and unit variance for all dimensions | |
void | init (Array< vec > &means_in, bool full_in=false) |
Initialise the model using user supplied mean vectors. | |
void | init (Array< vec > &means_in, Array< vec > &diag_covs_in, vec &weights_in) |
Initialise the model using user supplied parameters (diagonal covariance version) | |
void | init (Array< vec > &means_in, Array< mat > &full_covs_in, vec &weights_in) |
Initialise the model using user supplied parameters (full covariance version) | |
virtual void | cleanup () |
Release memory used by the model. The model will be empty. | |
bool | is_valid () const |
Returns true if the model's parameters are valid. | |
bool | is_full () const |
Returns true if the model has full covariance matrices. | |
int | get_K () const |
Return the number of Gaussians. | |
int | get_D () const |
Return the dimensionality. | |
vec | get_weights () const |
Obtain a copy of the weight vector. | |
Array< vec > | get_means () const |
Obtain a copy of the array of mean vectors. | |
Array< vec > | get_diag_covs () const |
Obtain a copy of the array of diagonal covariance vectors. | |
Array< mat > | get_full_covs () const |
Obtain a copy of the array of full covariance matrices. | |
void | set_means (Array< vec > &means_in) |
Set the means of the model. | |
void | set_diag_covs (Array< vec > &diag_covs_in) |
Set the diagonal covariance vectors of the model. | |
void | set_full_covs (Array< mat > &full_covs_in) |
Set the full covariance matrices of the model. | |
void | set_weights (vec &weights_in) |
Set the weight vector of the model. | |
void | set_means_zero () |
Set the means in the model to be zero. | |
void | set_diag_covs_unity () |
Set the diagonal covariance vectors to be unity. | |
void | set_full_covs_unity () |
Set the full covariance matrices to be unity. | |
void | set_weights_uniform () |
Set all the weights to 1/K, where K is the number of Gaussians. | |
void | set_checks (bool do_checks_in) |
Enable/disable internal checks for likelihood functions. | |
void | set_paranoid (bool paranoid_in) |
Enable/disable paranoia about numerical stability. | |
virtual void | load (const std::string &name_in) |
Initialise the model by loading the parameters from a model file. | |
virtual void | save (const std::string &name_in) const |
Save the model's parameters to a model file. | |
virtual void | join (const MOG_generic &B_in) |
Mathematically join the model with a user supplied model. | |
virtual void | convert_to_diag () |
Convert the model to use diagonal covariances. | |
virtual void | convert_to_full () |
Convert the model to have full covariance matrices. | |
virtual double | log_lhood_single_gaus (const vec &x_in, const int k) |
calculate the log likelihood of vector x_in using only Gaussian k | |
virtual double | log_lhood (const vec &x_in) |
calculate the log likelihood of vector x_in | |
virtual double | lhood (const vec &x_in) |
calculate the likelihood of vector x_in | |
virtual double | avg_log_lhood (const Array< vec > &X_in) |
calculate the average log likelihood of an array of vectors X_in | |
Protected Member Functions | |
bool | check_size (const vec &x_in) const |
Check if vector x_in has the same dimensionality as the model. | |
bool | check_size (const Array< vec > &X_in) const |
Check if all vectors in Array X_in have the same dimensionality as the model. | |
bool | check_array_uniformity (const Array< vec > &A) const |
Check if all vectors in Array X_in have the same dimensionality. | |
void | set_means_internal (Array< vec > &means_in) |
ADD DOCUMENTATION HERE. | |
void | set_diag_covs_internal (Array< vec > &diag_covs_in) |
ADD DOCUMENTATION HERE. | |
void | set_full_covs_internal (Array< mat > &full_covs_in) |
ADD DOCUMENTATION HERE. | |
void | set_weights_internal (vec &_weigths) |
ADD DOCUMENTATION HERE. | |
void | set_means_zero_internal () |
ADD DOCUMENTATION HERE. | |
void | set_diag_covs_unity_internal () |
ADD DOCUMENTATION HERE. | |
void | set_full_covs_unity_internal () |
ADD DOCUMENTATION HERE. | |
void | set_weights_uniform_internal () |
ADD DOCUMENTATION HERE. | |
void | convert_to_diag_internal () |
ADD DOCUMENTATION HERE. | |
void | convert_to_full_internal () |
ADD DOCUMENTATION HERE. | |
virtual void | setup_means () |
additional processing of mean vectors, done as the last step of mean initialisation | |
virtual void | setup_covs () |
additional processing of covariance vectors/matrices, done as the last step of covariance initialisation | |
virtual void | setup_weights () |
additional processing of the weight vector, done as the last step of weight initialisation | |
virtual void | setup_misc () |
additional processing of miscellaneous parameters, done as the last step of overall initialisation | |
virtual double | log_lhood_single_gaus_internal (const vec &x_in, const int k) |
ADD DOCUMENTATION HERE. | |
virtual double | log_lhood_internal (const vec &x_in) |
ADD DOCUMENTATION HERE. | |
virtual double | lhood_internal (const vec &x_in) |
ADD DOCUMENTATION HERE. | |
Protected Attributes | |
bool | do_checks |
indicates whether checks on input data are done | |
bool | valid |
indicates whether the parameters are valid | |
bool | full |
indicates whether we are using full or diagonal covariance matrices | |
bool | paranoid |
indicates whether we are paranoid about numerical stability | |
int | K |
number of gaussians | |
int | D |
dimensionality | |
Array< vec > | means |
means | |
Array< vec > | diag_covs |
diagonal covariance matrices, stored as vectors | |
Array< mat > | full_covs |
full covariance matrices | |
vec | weights |
weights | |
double | log_max_K |
Pre-calcualted std::log(std::numeric_limits<double>::max() / K), where K is the number of Gaussians. | |
vec | log_det_etc |
Gaussian specific pre-calcualted constants. | |
vec | log_weights |
Pre-calculated log versions of the weights. | |
Array< mat > | full_covs_inv |
Pre-calcuated inverted version of each full covariance matrix. | |
Array< vec > | diag_covs_inv_etc |
Pre-calcuated inverted version of each diagonal covariance vector, where the covariance elements are first multiplied by two. | |
Generic Mixture of Gaussians (MOG) class. Used as a base for other MOG classes.
Used for representing a statistical distribution as a convex combination of multi-variate Gaussian functions. Also known as a Gaussian Mixture Model. This class handles both full and diagonal covariance matrices, allows loading and saving of the MOG's parameters, as well as calculation of likelihoods. The parameters are set by the user or an optimisation algorithm (for example, see the MOG_diag_EM class). For speed and space reasons, diagonal and full covariance matrices are stored and handled separately.
Definition at line 57 of file mog_generic.h.
|
inline |
Default constructor.
Definition at line 67 of file mog_generic.h.
|
inline |
Construct the MOG_generic object by loading the parameters from a model file.
name_in | The model's filename |
Definition at line 72 of file mog_generic.h.
construct a default model (all Gaussians have zero mean and unit variance for all dimensions)
K_in | Number of Gaussians |
D_in | Dimensionality |
full_in | If true, use full covariance matrices; if false, use diagonal covariance matrices. Default = false. |
Definition at line 79 of file mog_generic.h.
Construct a model using user supplied mean vectors.
means_in | Array of mean vectors |
full_in | If true, use full covariance matrices; if false, use diagonal covariance matrices. Default = false. |
Definition at line 88 of file mog_generic.h.
|
inline |
Construct a model using user supplied parameters (diagonal covariance version)
means_in | Array of mean vectors |
diag_covs_in | Array of vectors representing diagonal covariances |
weights_in | vector of weights |
Definition at line 96 of file mog_generic.h.
|
inline |
Construct a model using user supplied parameters (full covariance version)
means_in | Array of mean vectors |
full_covs_in | Array of full covariance matrices |
weights_in | vector of weights |
Definition at line 104 of file mog_generic.h.
|
inlinevirtual |
Default destructor.
Definition at line 107 of file mog_generic.h.
void itpp::MOG_generic::init | ( | ) |
Initialise the model to be empty.
Definition at line 43 of file mog_generic.cpp.
References cleanup().
Referenced by join(), load(), itpp::MOG_diag_EM_sup::ml(), and itpp::MOG_diag_kmeans_sup::run().
initialise the model so that all Gaussians have zero mean and unit variance for all dimensions
K_in | Number of Gaussians |
D_in | Dimensionality |
full_in | If true, use full covariance matrices; if false, use diagonal covariance matrices. Default = false. |
Definition at line 46 of file mog_generic.cpp.
References D, do_checks, full, it_assert, K, paranoid, set_diag_covs_unity_internal(), set_full_covs_unity_internal(), set_means_zero_internal(), set_weights_uniform_internal(), setup_misc(), and valid.
Initialise the model using user supplied mean vectors.
means_in | Array of mean vectors |
full_in | If true, use full covariance matrices; if false, use diagonal covariance matrices. Default = false. |
Definition at line 69 of file mog_generic.cpp.
References check_array_uniformity(), D, do_checks, full, it_assert, K, paranoid, set_diag_covs_unity_internal(), set_full_covs_unity_internal(), set_means(), set_weights_uniform_internal(), setup_misc(), itpp::Array< T >::size(), and valid.
void itpp::MOG_generic::init | ( | Array< vec > & | means_in, |
Array< vec > & | diag_covs_in, | ||
vec & | weights_in | ||
) |
Initialise the model using user supplied parameters (diagonal covariance version)
means_in | Array of mean vectors |
diag_covs_in | Array of vectors representing diagonal covariances |
weights_in | vector of weights |
Definition at line 89 of file mog_generic.cpp.
References check_array_uniformity(), D, do_checks, full, it_assert, K, paranoid, set_diag_covs_internal(), set_means_internal(), set_weights_internal(), setup_misc(), itpp::Array< T >::size(), and valid.
void itpp::MOG_generic::init | ( | Array< vec > & | means_in, |
Array< mat > & | full_covs_in, | ||
vec & | weights_in | ||
) |
Initialise the model using user supplied parameters (full covariance version)
means_in | Array of mean vectors |
full_covs_in | Array of covariance matrices |
weights_in | vector of weights |
Definition at line 110 of file mog_generic.cpp.
References check_array_uniformity(), D, do_checks, full, it_assert, K, paranoid, set_full_covs_internal(), set_means_internal(), set_weights_internal(), setup_misc(), itpp::Array< T >::size(), and valid.
|
virtual |
Release memory used by the model. The model will be empty.
Reimplemented in itpp::MOG_diag.
Definition at line 329 of file mog_generic.cpp.
References D, diag_covs, diag_covs_inv_etc, do_checks, full_covs, full_covs_inv, K, log_det_etc, log_weights, means, itpp::Array< T >::set_size(), valid, and weights.
Referenced by itpp::MOG_diag::cleanup(), and init().
|
inline |
Returns true if the model's parameters are valid.
Definition at line 154 of file mog_generic.h.
|
inline |
Returns true if the model has full covariance matrices.
Definition at line 157 of file mog_generic.h.
References itpp::full().
|
inline |
Return the number of Gaussians.
Definition at line 160 of file mog_generic.h.
|
inline |
Return the dimensionality.
Definition at line 163 of file mog_generic.h.
|
inline |
Obtain a copy of the weight vector.
Definition at line 166 of file mog_generic.h.
|
inline |
Obtain a copy of the array of mean vectors.
Definition at line 169 of file mog_generic.h.
|
inline |
Obtain a copy of the array of diagonal covariance vectors.
Definition at line 172 of file mog_generic.h.
References itpp::full().
|
inline |
Obtain a copy of the array of full covariance matrices.
Definition at line 175 of file mog_generic.h.
References itpp::full().
Set the means of the model.
Definition at line 351 of file mog_generic.cpp.
References set_means_internal(), and valid.
Referenced by init().
Set the diagonal covariance vectors of the model.
Definition at line 365 of file mog_generic.cpp.
References set_diag_covs_internal(), and valid.
Set the full covariance matrices of the model.
Definition at line 372 of file mog_generic.cpp.
References set_full_covs_internal(), and valid.
void itpp::MOG_generic::set_weights | ( | vec & | weights_in | ) |
Set the weight vector of the model.
Definition at line 379 of file mog_generic.cpp.
References set_weights_internal(), and valid.
void itpp::MOG_generic::set_means_zero | ( | ) |
Set the means in the model to be zero.
Definition at line 358 of file mog_generic.cpp.
References set_means_zero_internal(), and valid.
void itpp::MOG_generic::set_diag_covs_unity | ( | ) |
Set the diagonal covariance vectors to be unity.
Definition at line 386 of file mog_generic.cpp.
References set_diag_covs_unity_internal(), and valid.
void itpp::MOG_generic::set_full_covs_unity | ( | ) |
Set the full covariance matrices to be unity.
Definition at line 393 of file mog_generic.cpp.
References set_full_covs_unity_internal(), and valid.
void itpp::MOG_generic::set_weights_uniform | ( | ) |
Set all the weights to 1/K, where K is the number of Gaussians.
Definition at line 400 of file mog_generic.cpp.
References set_weights_uniform_internal(), and valid.
Enable/disable internal checks for likelihood functions.
do_checks_in | If true, checks are enabled; if false, checks are disabled |
Definition at line 214 of file mog_generic.h.
Enable/disable paranoia about numerical stability.
paranoid_in | If true, calculate likelihoods using a safer, but slower method. |
Definition at line 219 of file mog_generic.h.
Initialise the model by loading the parameters from a model file.
name_in | The model's filename |
Reimplemented in itpp::MOG_diag.
Definition at line 407 of file mog_generic.cpp.
References itpp::exist(), init(), it_assert, and valid.
Referenced by itpp::MOG_diag::load().
|
virtual |
Mathematically join the model with a user supplied model.
B_in | user supplied model |
See On transforming statistical models... for more information.
Definition at line 453 of file mog_generic.cpp.
References itpp::concat(), D, diag_covs, full, full_covs, init(), it_assert, K, means, valid, and weights.
|
virtual |
Convert the model to use diagonal covariances.
Definition at line 499 of file mog_generic.cpp.
References convert_to_diag_internal(), and valid.
Referenced by itpp::MOG_diag::load().
|
virtual |
Convert the model to have full covariance matrices.
Reimplemented in itpp::MOG_diag.
Definition at line 518 of file mog_generic.cpp.
References convert_to_full_internal(), and valid.
calculate the log likelihood of vector x_in
using only Gaussian k
Definition at line 550 of file mog_generic.cpp.
References check_size(), do_checks, it_assert, K, log_lhood_single_gaus_internal(), and valid.
calculate the log likelihood of vector x_in
Reimplemented in itpp::MOG_diag.
Definition at line 586 of file mog_generic.cpp.
References check_size(), do_checks, it_assert, log_lhood_internal(), and valid.
calculate the likelihood of vector x_in
Reimplemented in itpp::MOG_diag.
Definition at line 621 of file mog_generic.cpp.
References check_size(), do_checks, it_assert, lhood_internal(), and valid.
calculate the average log likelihood of an array of vectors X_in
Reimplemented in itpp::MOG_diag.
Definition at line 632 of file mog_generic.cpp.
References check_size(), do_checks, it_assert, log_lhood_internal(), itpp::Array< T >::size(), and valid.
Check if vector x_in
has the same dimensionality as the model.
Definition at line 130 of file mog_generic.cpp.
References D, and itpp::Array< T >::size().
Referenced by itpp::MOG_diag::avg_log_lhood(), avg_log_lhood(), check_size(), itpp::MOG_diag::lhood(), lhood(), itpp::MOG_diag::log_lhood(), log_lhood(), log_lhood_single_gaus(), itpp::MOG_diag::log_lhood_single_gaus(), and itpp::MOG_diag_kmeans_sup::run().
Check if all vectors in Array X_in
have the same dimensionality as the model.
Definition at line 137 of file mog_generic.cpp.
References check_array_uniformity(), and check_size().
Check if all vectors in Array X_in
have the same dimensionality.
Definition at line 144 of file mog_generic.cpp.
References itpp::Array< T >::size(), and itpp::size().
Referenced by check_size(), init(), init(), init(), and itpp::MOG_diag_EM_sup::ml().
ADD DOCUMENTATION HERE.
Definition at line 164 of file mog_generic.cpp.
References D, it_assert, K, means, setup_means(), itpp::Array< T >::size(), and itpp::size().
Referenced by init(), init(), and set_means().
ADD DOCUMENTATION HERE.
Definition at line 180 of file mog_generic.cpp.
References D, diag_covs, full, full_covs, it_assert, K, itpp::Array< T >::set_size(), setup_covs(), itpp::Array< T >::size(), and itpp::size().
Referenced by init(), and set_diag_covs().
ADD DOCUMENTATION HERE.
Definition at line 200 of file mog_generic.cpp.
References D, diag_covs, full, full_covs, it_assert, K, itpp::Array< T >::set_size(), setup_covs(), and itpp::Array< T >::size().
Referenced by init(), and set_full_covs().
|
protected |
ADD DOCUMENTATION HERE.
Definition at line 225 of file mog_generic.cpp.
References it_assert, K, setup_weights(), itpp::Array< T >::size(), and weights.
Referenced by init(), init(), and set_weights().
|
protected |
ADD DOCUMENTATION HERE.
Definition at line 156 of file mog_generic.cpp.
References D, K, means, itpp::Array< T >::set_size(), and setup_means().
Referenced by init(), and set_means_zero().
|
protected |
ADD DOCUMENTATION HERE.
Definition at line 241 of file mog_generic.cpp.
References D, diag_covs, full, full_covs, K, itpp::Array< T >::set_size(), and setup_covs().
Referenced by init(), init(), and set_diag_covs_unity().
|
protected |
ADD DOCUMENTATION HERE.
Definition at line 253 of file mog_generic.cpp.
References D, diag_covs, full, full_covs, K, itpp::Array< T >::set_size(), and setup_covs().
Referenced by init(), init(), and set_full_covs_unity().
|
protected |
ADD DOCUMENTATION HERE.
Definition at line 269 of file mog_generic.cpp.
References K, itpp::Array< T >::set_size(), setup_weights(), and weights.
Referenced by init(), init(), and set_weights_uniform().
|
protected |
ADD DOCUMENTATION HERE.
Definition at line 486 of file mog_generic.cpp.
References itpp::diag(), diag_covs, full, full_covs, K, itpp::Array< T >::set_size(), and setup_covs().
Referenced by convert_to_diag(), and itpp::MOG_diag::setup_misc().
|
protected |
ADD DOCUMENTATION HERE.
Definition at line 506 of file mog_generic.cpp.
References itpp::diag(), diag_covs, full, full_covs, K, itpp::Array< T >::set_size(), and setup_covs().
Referenced by convert_to_full().
|
protectedvirtual |
additional processing of mean vectors, done as the last step of mean initialisation
Reimplemented in itpp::MOG_diag.
Definition at line 277 of file mog_generic.cpp.
Referenced by set_means_internal(), set_means_zero_internal(), and itpp::MOG_diag::setup_means().
|
protectedvirtual |
additional processing of covariance vectors/matrices, done as the last step of covariance initialisation
Reimplemented in itpp::MOG_diag.
Definition at line 279 of file mog_generic.cpp.
References D, itpp::det(), diag_covs, diag_covs_inv_etc, full, full_covs, full_covs_inv, itpp::inv(), K, log_det_etc, itpp::m_2pi, and itpp::Array< T >::set_size().
Referenced by convert_to_diag_internal(), convert_to_full_internal(), set_diag_covs_internal(), set_diag_covs_unity_internal(), set_full_covs_internal(), set_full_covs_unity_internal(), and itpp::MOG_diag::setup_covs().
|
protectedvirtual |
additional processing of the weight vector, done as the last step of weight initialisation
Reimplemented in itpp::MOG_diag.
Definition at line 314 of file mog_generic.cpp.
References itpp::log(), log_weights, itpp::sum(), and weights.
Referenced by set_weights_internal(), set_weights_uniform_internal(), and itpp::MOG_diag::setup_weights().
|
protectedvirtual |
additional processing of miscellaneous parameters, done as the last step of overall initialisation
Reimplemented in itpp::MOG_diag.
Definition at line 321 of file mog_generic.cpp.
References D, K, and log_max_K.
Referenced by init(), init(), init(), init(), and itpp::MOG_diag::setup_misc().
|
protectedvirtual |
ADD DOCUMENTATION HERE.
Definition at line 526 of file mog_generic.cpp.
References D, diag_covs_inv_etc, full, full_covs_inv, log_det_etc, itpp::mean(), and means.
Referenced by lhood_internal(), log_lhood_internal(), and log_lhood_single_gaus().
ADD DOCUMENTATION HERE.
Reimplemented in itpp::MOG_diag.
Definition at line 561 of file mog_generic.cpp.
References K, itpp::log_add(), log_lhood_single_gaus_internal(), log_max_K, log_weights, paranoid, and itpp::sum().
Referenced by avg_log_lhood(), and log_lhood().
ADD DOCUMENTATION HERE.
Reimplemented in itpp::MOG_diag.
Definition at line 596 of file mog_generic.cpp.
References K, itpp::log_add(), log_lhood_single_gaus_internal(), log_max_K, log_weights, paranoid, itpp::sum(), and itpp::trunc_exp().
Referenced by lhood().
|
protected |
indicates whether checks on input data are done
Definition at line 280 of file mog_generic.h.
Referenced by itpp::MOG_diag::avg_log_lhood(), avg_log_lhood(), itpp::MOG_diag::avg_log_lhood(), cleanup(), init(), init(), init(), init(), itpp::MOG_diag::lhood(), itpp::MOG_diag::lhood(), lhood(), itpp::MOG_diag::log_lhood(), itpp::MOG_diag::log_lhood(), log_lhood(), itpp::MOG_diag::log_lhood_single_gaus(), log_lhood_single_gaus(), and itpp::MOG_diag::log_lhood_single_gaus().
|
protected |
indicates whether the parameters are valid
Definition at line 283 of file mog_generic.h.
Referenced by itpp::MOG_diag::avg_log_lhood(), avg_log_lhood(), itpp::MOG_diag::avg_log_lhood(), cleanup(), convert_to_diag(), convert_to_full(), init(), init(), init(), init(), join(), itpp::MOG_diag::lhood(), itpp::MOG_diag::lhood(), lhood(), load(), itpp::MOG_diag::log_lhood(), itpp::MOG_diag::log_lhood(), log_lhood(), itpp::MOG_diag::log_lhood_single_gaus(), log_lhood_single_gaus(), itpp::MOG_diag::log_lhood_single_gaus(), save(), set_diag_covs(), set_diag_covs_unity(), set_full_covs(), set_full_covs_unity(), set_means(), set_means_zero(), set_weights(), and set_weights_uniform().
|
protected |
indicates whether we are using full or diagonal covariance matrices
Definition at line 286 of file mog_generic.h.
Referenced by convert_to_diag_internal(), convert_to_full_internal(), init(), init(), init(), init(), join(), itpp::MOG_diag::load(), log_lhood_single_gaus_internal(), save(), set_diag_covs_internal(), set_diag_covs_unity_internal(), set_full_covs_internal(), set_full_covs_unity_internal(), itpp::MOG_diag::setup_covs(), setup_covs(), and itpp::MOG_diag::setup_misc().
|
protected |
indicates whether we are paranoid about numerical stability
Definition at line 289 of file mog_generic.h.
Referenced by init(), init(), init(), init(), itpp::MOG_diag::lhood_internal(), lhood_internal(), itpp::MOG_diag::log_lhood_internal(), log_lhood_internal(), and itpp::MOG_diag_EM_sup::ml_update_params().
|
protected |
number of gaussians
Definition at line 292 of file mog_generic.h.
Referenced by itpp::MOG_diag_kmeans_sup::assign_to_means(), itpp::MOG_diag_kmeans_sup::calc_covs(), itpp::MOG_diag_kmeans_sup::calc_weights(), cleanup(), convert_to_diag_internal(), convert_to_full_internal(), itpp::MOG_diag_kmeans_sup::dezombify_means(), init(), init(), init(), init(), itpp::MOG_diag_kmeans_sup::initial_means(), itpp::MOG_diag_kmeans_sup::iterate(), join(), itpp::MOG_diag::lhood_internal(), lhood_internal(), itpp::MOG_diag::log_lhood_internal(), log_lhood_internal(), itpp::MOG_diag::log_lhood_single_gaus(), log_lhood_single_gaus(), itpp::MOG_diag::log_lhood_single_gaus(), itpp::MOG_diag_kmeans_sup::measure_change(), itpp::MOG_diag_EM_sup::ml(), itpp::MOG_diag_EM_sup::ml_update_params(), itpp::MOG_diag_kmeans_sup::recalculate_means(), itpp::MOG_diag_kmeans_sup::run(), itpp::MOG_diag_EM_sup::sanitise_params(), set_diag_covs_internal(), set_diag_covs_unity_internal(), set_full_covs_internal(), set_full_covs_unity_internal(), set_means_internal(), set_means_zero_internal(), set_weights_internal(), set_weights_uniform_internal(), setup_covs(), itpp::MOG_diag::setup_misc(), setup_misc(), itpp::MOG_diag_kmeans_sup::unnormalise_means(), and itpp::MOG_diag_EM_sup::update_internals().
|
protected |
dimensionality
Definition at line 295 of file mog_generic.h.
Referenced by itpp::MOG_diag_kmeans_sup::calc_covs(), check_size(), cleanup(), itpp::MOG_diag_kmeans_sup::dezombify_means(), itpp::MOG_diag_kmeans_sup::dist(), init(), init(), init(), init(), itpp::MOG_diag_kmeans_sup::initial_means(), itpp::MOG_diag_kmeans_sup::iterate(), join(), itpp::MOG_diag::log_lhood_single_gaus_internal(), log_lhood_single_gaus_internal(), itpp::MOG_diag_EM_sup::ml(), itpp::MOG_diag_EM_sup::ml_update_params(), itpp::MOG_diag_kmeans_sup::normalise_vectors(), itpp::MOG_diag_kmeans_sup::recalculate_means(), itpp::MOG_diag_kmeans_sup::run(), itpp::MOG_diag_EM_sup::sanitise_params(), set_diag_covs_internal(), set_diag_covs_unity_internal(), set_full_covs_internal(), set_full_covs_unity_internal(), set_means_internal(), set_means_zero_internal(), setup_covs(), setup_misc(), itpp::MOG_diag_kmeans_sup::unnormalise_means(), itpp::MOG_diag_kmeans_sup::unnormalise_vectors(), and itpp::MOG_diag_EM_sup::update_internals().
|
protected |
means
Definition at line 298 of file mog_generic.h.
Referenced by cleanup(), join(), log_lhood_single_gaus_internal(), itpp::MOG_diag_EM_sup::ml(), itpp::MOG_diag_kmeans_sup::run(), save(), set_means_internal(), set_means_zero_internal(), and itpp::MOG_diag::setup_means().
|
protected |
diagonal covariance matrices, stored as vectors
Definition at line 301 of file mog_generic.h.
Referenced by cleanup(), convert_to_diag_internal(), convert_to_full_internal(), join(), itpp::MOG_diag_EM_sup::ml(), itpp::MOG_diag_kmeans_sup::run(), save(), set_diag_covs_internal(), set_diag_covs_unity_internal(), set_full_covs_internal(), set_full_covs_unity_internal(), itpp::MOG_diag::setup_covs(), and setup_covs().
|
protected |
full covariance matrices
Definition at line 304 of file mog_generic.h.
Referenced by cleanup(), convert_to_diag_internal(), convert_to_full_internal(), join(), save(), set_diag_covs_internal(), set_diag_covs_unity_internal(), set_full_covs_internal(), set_full_covs_unity_internal(), and setup_covs().
|
protected |
weights
Definition at line 307 of file mog_generic.h.
Referenced by cleanup(), join(), itpp::MOG_diag_EM_sup::ml(), itpp::MOG_diag_kmeans_sup::run(), save(), set_weights_internal(), set_weights_uniform_internal(), itpp::MOG_diag::setup_weights(), and setup_weights().
|
protected |
Pre-calcualted std::log(std::numeric_limits<double>::max() / K), where K is the number of Gaussians.
Definition at line 310 of file mog_generic.h.
Referenced by itpp::MOG_diag::lhood_internal(), lhood_internal(), itpp::MOG_diag::log_lhood_internal(), log_lhood_internal(), itpp::MOG_diag_EM_sup::ml_update_params(), and setup_misc().
|
protected |
Gaussian specific pre-calcualted constants.
Definition at line 317 of file mog_generic.h.
Referenced by cleanup(), log_lhood_single_gaus_internal(), itpp::MOG_diag::setup_covs(), and setup_covs().
|
protected |
Pre-calculated log versions of the weights.
Definition at line 320 of file mog_generic.h.
Referenced by cleanup(), lhood_internal(), log_lhood_internal(), itpp::MOG_diag::setup_weights(), and setup_weights().
|
protected |
Pre-calcuated inverted version of each full covariance matrix.
Definition at line 323 of file mog_generic.h.
Referenced by cleanup(), log_lhood_single_gaus_internal(), and setup_covs().
|
protected |
Pre-calcuated inverted version of each diagonal covariance vector, where the covariance elements are first multiplied by two.
Definition at line 326 of file mog_generic.h.
Referenced by cleanup(), log_lhood_single_gaus_internal(), itpp::MOG_diag::setup_covs(), and setup_covs().
Generated on Tue Mar 26 2024 19:08:31 for IT++ by Doxygen 1.9.8