-
Notifications
You must be signed in to change notification settings - Fork 0
/
GMM.h
34 lines (25 loc) · 970 Bytes
/
GMM.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <string>
using namespace std;
class Gaussian_Mixture_Model{
private:
string type_covariance;
int dimension_data;
int number_gaussian_components;
public:
double *weight;
double **mean;
double **diagonal_covariance;
double ***covariance;
Gaussian_Mixture_Model(string type_covariance, int dimension_data, int number_gaussian_components);
~Gaussian_Mixture_Model();
void Initialize(int number_data, double **data);
void Load_Parameter(string path);
void Save_Parameter(string path);
int Classify(double data[]);
double Calculate_Likelihood(double data[]);
double Calculate_Likelihood(double data[], double gaussian_distribution[]);
double Expectaion_Maximization(int number_data, double **data);
double Gaussian_Distribution(double data[], int component_index);
double Gaussian_Distribution(double data[], double mean[], double diagonal_covariance[]);
double Gaussian_Distribution(double data[], double mean[], double **covariance);
};