30 #ifndef MOG_DIAG_KMEANS_H 31 #define MOG_DIAG_KMEANS_H 34 #include <itpp/itexports.h> 55 void run(
MOG_diag &model_in,
Array<vec> &X_in,
int max_iter_in = 10,
double trust_in = 0.5,
bool normalise_in =
true,
bool verbose_in =
false);
60 inline double dist(
const double * x,
const double * y)
const;
62 void assign_to_means();
64 void recalculate_means();
66 bool dezombify_means();
68 double measure_change()
const;
80 void normalise_vectors();
82 void unnormalise_vectors();
84 void unnormalise_means();
175 #endif // #ifndef MOG_DIAG_KMEANS_H Diagonal Mixture of Gaussians class - header file.
ivec count
keeps a count of the number of vectors assigned to each mean
MOG_diag_kmeans_sup()
Default constructor.
support class for MOG_diag_kmeans()
bool verbose
Whether we print the progress.
double trust
trust factor, where 0 <= trust <= 1.
int * c_count
'C' pointer to the count vector
int N
number of training vectors
double ** c_means_old
'C' pointers to old means
int max_iter
Maximum number of iterations.
Diagonal Mixture of Gaussians (MOG) class.
Import/Export definitions for some templates defined in base folder.
Array< vec > means_old
means from the previous iteration, used to measure progress
Array< ivec > partitions
contains indices of vectors assigned to each mean
~MOG_diag_kmeans_sup()
Default destructor.
double ** c_X
'C' pointers to training vectors
int ** c_partitions
'C' pointers to partition vectors
void MOG_diag_kmeans(MOG_diag &model_in, Array< vec > &X_in, int max_iter_in, double trust_in, bool normalise_in, bool verbose_in)