gmm.h File Reference
GMM (Gaussian Mixture Models (GMM)) More...
#include "kmeans.h"
Typedefs | |
typedef OPAQUE | VlGMM |
GMM quantizer. |
Enumerations | |
enum | VlGMMInitialization { VlGMMKMeans, VlGMMRand, VlGMMCustom } |
GMM initialization algorithms. More... |
Functions | |
Create and destroy | |
VlGMM * | vl_gmm_new (vl_type dataType) |
Create a new GMM object. | |
VlGMM * | vl_gmm_new_copy (VlGMM const *gmm) |
Create a new GMM object by copy. | |
void | vl_gmm_delete (VlGMM *self) |
Deletes a GMM object. | |
void | vl_gmm_reset (VlGMM *self) |
Reset state. | |
Basic data processing | |
double | vl_gmm_get_mixture (VlGMM *self, void const *data, vl_size numData) |
Invoke the EM algorithm. | |
double | vl_gmm_cluster (VlGMM *self, void const *data, vl_size dimension, vl_size numData, vl_size numCenters) |
Run GMM clustering - includes initialization and EM. | |
void | vl_gmm_rand_init_mixture (VlGMM *self, void const *data, vl_size dimension, vl_size numData, vl_size numMeans) |
Initialize mixture before EM takes place using random initialization. | |
void | vl_gmm_kmeans_init_mixture (VlGMM *self, void const *data, vl_size dimension, vl_size numData, vl_size numClusters) |
Initialize mixture before EM takes place using kmeans. | |
void | vl_gmm_init_mixture (VlGMM *self, void const *data, vl_size dimension, vl_size numData, vl_size numClusters) |
Initialize mixture before EM takes place. | |
Advanced data processing | |
void | vl_gmm_set_means (VlGMM *self, void *means, vl_size numClusters, vl_size dimension) |
Explicitly set the initial means for EM. | |
void | vl_gmm_set_sigmas (VlGMM *self, void *sigmas, vl_size numClusters, vl_size dimension) |
Explicitly set the initial sigma diagonals for EM. | |
void | vl_gmm_set_weights (VlGMM *self, void *weights, vl_size numClusters) |
Explicitly set the initial weights of the gaussians. | |
void | vl_gmm_set_posteriors (VlGMM *self, void *posteriors, vl_size numClusters, vl_size numData) |
Explicitly set the posterior probabilities. | |
Set parameters | |
void | vl_gmm_set_dimension (VlGMM *self, vl_size dimension) |
Set dimensionality of the data. | |
void | vl_gmm_set_num_repetitions (VlGMM *self, vl_size numRepetitions) |
Set maximum number of repetitions. | |
void | vl_gmm_set_max_num_iterations (VlGMM *self, vl_size maxNumIterations) |
Set maximum number of iterations. | |
void | vl_gmm_set_verbosity (VlGMM *self, int verbosity) |
Set verbosity level. | |
void | vl_gmm_set_num_clusters (VlGMM *self, vl_size numClusters) |
Set the number of clusters. | |
void | vl_gmm_set_initialization (VlGMM *self, VlGMMInitialization init) |
Set initialization algorithm. | |
void | vl_gmm_set_kmeans_init_object (VlGMM *self, VlKMeans *kmeans) |
Set KMeans initialization object. | |
void | vl_gmm_set_sigma_lower_bound (VlGMM *self, double lowbound) |
Set lower bound on sigma diagonals. | |
Get parameters | |
void const * | vl_gmm_get_means (VlGMM const *self) |
Get means. | |
void const * | vl_gmm_get_sigmas (VlGMM const *self) |
Get sigmas. | |
void const * | vl_gmm_get_priors (VlGMM const *self) |
Get weights. | |
void const * | vl_gmm_get_posteriors (VlGMM const *self) |
Get posteriors. | |
vl_type | vl_gmm_get_data_type (VlGMM const *self) |
Get data type. | |
vl_size | vl_gmm_get_dimension (VlGMM const *self) |
Get data dimension. | |
vl_size | vl_gmm_get_num_clusters (VlGMM const *self) |
Get the number of clusters. | |
vl_size | vl_gmm_get_num_data (VlGMM const *self) |
Get the number of data points. | |
double | vl_gmm_get_loglikelyhood (VlGMM const *self) |
int | vl_gmm_get_verbosity (VlGMM const *self) |
Get verbosity level. | |
vl_size | vl_gmm_get_max_num_iterations (VlGMM const *self) |
Get maximum number of iterations. | |
vl_size | vl_gmm_get_num_repetitions (VlGMM const *self) |
Get maximum number of repetitions. | |
VlGMMInitialization | vl_gmm_get_initialization (VlGMM const *self) |
Get initialization algorithm. | |
VlKMeans * | vl_gmm_get_kmeans_init_object (VlGMM const *self) |
Get KMeans initialization object. | |
double | vl_gmm_get_sigma_lower_bound (VlGMM *self) |
Get lower bound on sigma diagonals. |
Detailed Description
Enumeration Type Documentation
enum VlGMMInitialization |
Function Documentation
double vl_gmm_cluster | ( | VlGMM * | self, |
void const * | data, | ||
vl_size | dimension, | ||
vl_size | numData, | ||
vl_size | numClusters | ||
) |
- Parameters:
-
self GMM object instance. data data points which should be clustered. dimension dimensionality of the data points. numData number of data points. numClusters number of gaussians which should be estimated.
void vl_gmm_delete | ( | VlGMM * | self | ) |
- Parameters:
-
self GMM object instance.
The function deletes the GMM object instance created by vl_gmm_new.
vl_type vl_gmm_get_data_type | ( | VlGMM const * | self | ) |
- Parameters:
-
self object
- Returns:
- data type.
VlGMMInitialization vl_gmm_get_initialization | ( | VlGMM const * | self | ) |
- Parameters:
-
self object
- Returns:
- initialization algorithm.
- Parameters:
-
self object
- Returns:
- kmeans initialization object.
- Parameters:
-
self object
- Returns:
- maximum number of iterations.
void const* vl_gmm_get_means | ( | VlGMM const * | self | ) |
- Parameters:
-
self object
- Returns:
- cluster means.
- Parameters:
-
self GMM object instance. data data points which should be clustered. numData number of data points.
- Parameters:
-
self object
- Returns:
- number of clusters.
- Parameters:
-
self object
- Returns:
- number of data points.
- Parameters:
-
self object
- Returns:
- current number of repretitions for quantization.
void const* vl_gmm_get_posteriors | ( | VlGMM const * | self | ) |
- Parameters:
-
self object
- Returns:
- posterior probabilities of cluster memberships.
void const* vl_gmm_get_priors | ( | VlGMM const * | self | ) |
- Parameters:
-
self object
- Returns:
- weights of cluster gaussians.
double vl_gmm_get_sigma_lower_bound | ( | VlGMM * | self | ) |
- Parameters:
-
self object
- Returns:
- lower bound on sigmas.
void const* vl_gmm_get_sigmas | ( | VlGMM const * | self | ) |
- Parameters:
-
self object
- Returns:
- diagonals of cluster covariance matrices.
int vl_gmm_get_verbosity | ( | VlGMM const * | self | ) |
- Parameters:
-
self object
- Returns:
- verbosity level.
void vl_gmm_init_mixture | ( | VlGMM * | self, |
void const * | data, | ||
vl_size | dimension, | ||
vl_size | numData, | ||
vl_size | numClusters | ||
) |
- Parameters:
-
self GMM object instance. data data points which should be clustered. dimension dimensionality of the data points. numData number of data points. numClusters number of gaussians which should be estimated.
void vl_gmm_kmeans_init_mixture | ( | VlGMM * | self, |
void const * | data, | ||
vl_size | dimension, | ||
vl_size | numData, | ||
vl_size | numClusters | ||
) |
- Parameters:
-
self GMM object instance. data data points which should be clustered. dimension dimensionality of the data points. numData number of data points. numClusters number of gaussians which should be estimated.
VlGMM* vl_gmm_new | ( | vl_type | dataType | ) |
- Parameters:
-
dataType type of data (VL_TYPE_FLOAT or VL_TYPE_DOUBLE)
- Returns:
- new GMM object instance.
void vl_gmm_rand_init_mixture | ( | VlGMM * | self, |
void const * | data, | ||
vl_size | dimension, | ||
vl_size | numData, | ||
vl_size | numClusters | ||
) |
- Parameters:
-
self GMM object instance. data data points which should be clustered. dimension dimensionality of the data points. numData number of data points. numClusters number of gaussians which should be estimated.
void vl_gmm_reset | ( | VlGMM * | self | ) |
- Parameters:
-
self object.
The function reset the state of the GMM object. It deletes any stored means, sigmas, weights and posterior probabilities releasing the corresponding memory. This cancels the effect of seeding or setting the means, sigmas and weights, but does not change the other configuration parameters.
- Parameters:
-
self object dimension dimensionality of the data. The number of repetitions cannot be smaller than 1.
void vl_gmm_set_initialization | ( | VlGMM * | self, |
VlGMMInitialization | init | ||
) |
- Parameters:
-
self object init initialization algorithm.
- Parameters:
-
self object kmeans initialization KMeans object.
- Parameters:
-
self VlGMM filter. maxNumIterations maximum number of iterations.
- Parameters:
-
self GMM object instance. means initial values of means. numClusters number of mean points. dimension dimensionality of the means.
- Parameters:
-
self object numClusters number of clusters..
- Parameters:
-
self object numRepetitions maximum number of repetitions. The number of repetitions cannot be smaller than 1.
void vl_gmm_set_posteriors | ( | VlGMM * | self, |
void * | posteriors, | ||
vl_size | numClusters, | ||
vl_size | numData | ||
) |
- Parameters:
-
self GMM object instance. posteriors initial values of the posterior probabilities. numClusters number of gaussians. numClusters number of data points.
void vl_gmm_set_sigma_lower_bound | ( | VlGMM * | self, |
double | lowbound | ||
) |
- Parameters:
-
self object lowbound lower bound on sigma diagonals.
- Parameters:
-
self GMM object instance. sigmas initial values of covariance matrix diagonals. numClusters number of sigma matrices. dimension number of points on the diagonals of the covariance matrices.
void vl_gmm_set_verbosity | ( | VlGMM * | self, |
int | verbosity | ||
) |
- Parameters:
-
self object verbosity verbosity level.