30#ifndef MOG_DIAG_KMEANS_H
31#define MOG_DIAG_KMEANS_H
34#include <itpp/itexports.h>
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();
Import/Export definitions for some templates defined in base folder.
support class for MOG_diag_kmeans()
int * c_count
'C' pointer to the count vector
int N
number of training vectors
double ** c_X
'C' pointers to training vectors
Array< vec > means_old
means from the previous iteration, used to measure progress
~MOG_diag_kmeans_sup()
Default destructor.
int ** c_partitions
'C' pointers to partition vectors
MOG_diag_kmeans_sup()
Default constructor.
double ** c_means_old
'C' pointers to old means
int max_iter
Maximum number of iterations.
double trust
trust factor, where 0 <= trust <= 1.
ivec count
keeps a count of the number of vectors assigned to each mean
Array< ivec > partitions
contains indices of vectors assigned to each mean
bool verbose
Whether we print the progress.
Diagonal Mixture of Gaussians (MOG) class.
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)
Diagonal Mixture of Gaussians class - header file.