33#include <itpp/itexports.h>
118 void load(
const std::string &name_in);
124 double log_lhood_single_gaus(
const double * c_x_in,
const int k)
const;
127 double log_lhood_single_gaus(
const vec &x_in,
const int k)
const;
130 double log_lhood(
const double * c_x_in);
133 double log_lhood(
const vec &x_in);
136 double lhood(
const double * c_x_in);
139 double lhood(
const vec &x_in);
142 double avg_log_lhood(
const double ** c_x_in,
int N);
145 double avg_log_lhood(
const Array<vec> & X_in);
151 void setup_weights();
155 double log_lhood_single_gaus_internal(
const double * c_x_in,
const int k)
const;
157 double log_lhood_single_gaus_internal(
const vec &x_in,
const int k)
const;
159 double log_lhood_internal(
const double * c_x_in);
161 double log_lhood_internal(
const vec &x_in);
163 double lhood_internal(
const double * c_x_in);
165 double lhood_internal(
const vec &x_in);
174 double * enable_c_access(vec & v_in);
177 int * enable_c_access(ivec & v_in);
180 double ** disable_c_access(
double ** A_in);
183 int ** disable_c_access(
int ** A_in);
186 double * disable_c_access(
double * v_in);
189 int * disable_c_access(
int * v_in);
192 void zero_all_ptrs();
194 void free_all_ptrs();
~MOG_diag()
Default destructor.
MOG_diag(Array< vec > &means_in, Array< mat > &full_covs_in, vec &weights_in)
Construct a model using user supplied parameters (full covariance version)
MOG_diag(Array< vec > &means_in, Array< vec > &diag_covs_in, vec &weights_in)
Construct a model using user supplied parameters (diagonal covariance version)
MOG_diag()
Default constructor.
MOG_diag(Array< vec > &means_in, bool)
Construct a model using user supplied mean vectors.
double ** c_diag_covs_inv_etc
pointers to the inverted covariance vectors
void load(const std::string &name_in)
Initialise the model by loading the parameters from a model file.
MOG_diag(const std::string &name)
Construct the MOG_diag object by loading the parameters from a model file.
void convert_to_full()
Do nothing. Present for compatability with the MOG_generic class.
void zero_all_ptrs()
ADD DOCUMENTATION HERE.
double ** c_means
pointers to the mean vectors
void cleanup()
Release memory used by the model. The model will be empty.
double * c_log_det_etc
pointer to the log_det_etc vector
MOG_diag(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)
double * c_log_weights
pointer to the log version of the weight vector
void free_all_ptrs()
ADD DOCUMENTATION HERE.
double * c_weights
pointer to the weight vector
double ** c_diag_covs
pointers to the covariance vectors
virtual void cleanup()
Release memory used by the model. The model will be empty.
void init()
Initialise the model to be empty.
virtual void convert_to_diag()
Convert the model to use diagonal covariances.
MOG_generic()
Default constructor.
Generic Mixture of Gaussians (MOG) class - header file.