mog_diag_em.h
Go to the documentation of this file.
#ifndef MOG_DIAG_EM_H
#define MOG_DIAG_EM_H
#include <itpp/stat/mog_diag.h>
#include <itpp/itexports.h>
#include <itpp/base/base_exports.h>
namespace itpp
{
class ITPP_EXPORT MOG_diag_EM_sup : public MOG_diag
{
public:
MOG_diag_EM_sup() { verbose = false; }
~MOG_diag_EM_sup() { }
void ml(MOG_diag &model_in, Array<vec> &X_in, int max_iter_in = 10, double var_floor_in = 0.0, double weight_floor_in = 0.0, bool verbose_in = false);
void map(MOG_diag &model_in, MOG_diag &prior_model, Array<vec> &X_in, int max_iter_in = 10, double alpha_in = 0.5, double var_floor_in = 0.0, double weight_floor_in = 0.0, bool verbose_in = false);
protected:
bool verbose;
int N;
int max_iter;
double ** c_X;
double var_floor;
double weight_floor;
void inline update_internals();
void inline sanitise_params();
double ml_update_params();
void ml_iterate();
private:
vec tmpvecK;
vec tmpvecD;
vec acc_loglhood_K;
Array<vec> acc_means;
Array<vec> acc_covs;
double * c_tmpvecK;
double * c_tmpvecD;
double * c_acc_loglhood_K;
double ** c_acc_means;
double ** c_acc_covs;
};
//
// convenience functions
void MOG_diag_ML(MOG_diag &model_in, Array<vec> &X_in, int max_iter_in = 10, double var_floor_in = 0.0, double weight_floor_in = 0.0, bool verbose_in = false);
void MOG_diag_MAP(MOG_diag &model_in, MOG_diag &prior_model_in, Array<vec> &X_in, int max_iter_in = 10, double alpha_in = 0.5, double var_floor_in = 0.0, double weight_floor_in = 0.0, bool verbose_in = false);
}
#endif // #ifndef MOG_DIAG_EM_H
base_exports.h
Import/Export definitions for some templates defined in base folder.
itpp::Array
General array class.
Definition array.h:105
itpp::MOG_diag_EM_sup
support class for MOG_diag_ML() and MOG_diag_MAP()
Definition mog_diag_em.h:44
itpp::MOG_diag_EM_sup::max_iter
int max_iter
Maximum number of iterations.
Definition mog_diag_em.h:68
itpp::MOG_diag_EM_sup::var_floor
double var_floor
ADD DOCUMENTATION HERE.
Definition mog_diag_em.h:74
itpp::MOG_diag_EM_sup::MOG_diag_EM_sup
MOG_diag_EM_sup()
Default constructor.
Definition mog_diag_em.h:49
itpp::MOG_diag_EM_sup::weight_floor
double weight_floor
ADD DOCUMENTATION HERE.
Definition mog_diag_em.h:76
itpp::MOG_diag_EM_sup::N
int N
number of training vectors
Definition mog_diag_em.h:65
itpp::MOG_diag_EM_sup::verbose
bool verbose
Whether we print the progress.
Definition mog_diag_em.h:62
itpp::MOG_diag_EM_sup::~MOG_diag_EM_sup
~MOG_diag_EM_sup()
Default destructor.
Definition mog_diag_em.h:52
itpp::MOG_diag_EM_sup::c_X
double ** c_X
'C' pointers to training vectors
Definition mog_diag_em.h:71
itpp::MOG_diag
Diagonal Mixture of Gaussians (MOG) class.
Definition mog_diag.h:56
itpp::MOG_diag_ML
void MOG_diag_ML(MOG_diag &model_in, Array< vec > &X_in, int max_iter_in, double var_floor_in, double weight_floor_in, bool verbose_in)
Definition mog_diag_em.cpp:316
mog_diag.h
Diagonal Mixture of Gaussians class - header file.
itpp
itpp namespace
Definition itmex.h:37
itpp::MOG_diag_MAP
void MOG_diag_MAP(MOG_diag &, MOG_diag &, Array< vec > &, int, double, double, double, bool)
Definition mog_diag_em.cpp:322

Generated on Mon Jun 10 2024 11:49:26 for IT++ by Doxygen 1.9.8