Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef VL_GMM_H
00016 #define VL_GMM_H
00017
00018 #include "kmeans.h"
00019
00021 typedef enum _VlGMMInitialization
00022 {
00023 VlGMMKMeans,
00024 VlGMMRand,
00025 VlGMMCustom
00026 } VlGMMInitialization ;
00027
00028
00029 #ifndef __DOXYGEN__
00030 struct _VlGMM ;
00031 typedef struct _VlGMM VlGMM ;
00032 #else
00033
00034 typedef OPAQUE VlGMM ;
00035 #endif
00036
00040 VL_EXPORT VlGMM * vl_gmm_new (vl_type dataType, vl_size dimension, vl_size numComponents) ;
00041 VL_EXPORT VlGMM * vl_gmm_new_copy (VlGMM const * gmm) ;
00042 VL_EXPORT void vl_gmm_delete (VlGMM * self) ;
00043 VL_EXPORT void vl_gmm_reset (VlGMM * self);
00049 VL_EXPORT double
00050 vl_gmm_cluster
00051 (VlGMM * self,
00052 void const * data,
00053 vl_size numData);
00059 VL_EXPORT void
00060 vl_gmm_init_with_rand_data
00061 (VlGMM * self,
00062 void const * data,
00063 vl_size numData) ;
00064
00065 VL_EXPORT void
00066 vl_gmm_init_with_kmeans
00067 (VlGMM * self,
00068 void const * data,
00069 vl_size numData,
00070 VlKMeans * kmeansInit);
00071
00072 VL_EXPORT double
00073 vl_gmm_em
00074 (VlGMM * self,
00075 void const * data,
00076 vl_size numData);
00079 VL_EXPORT void
00080 vl_gmm_set_means
00081 (VlGMM * self,
00082 void const * means);
00083
00084 VL_EXPORT void
00085 vl_gmm_set_covariances
00086 (VlGMM * self,
00087 void const * covariances);
00088
00089 VL_EXPORT void
00090 vl_gmm_set_priors
00091 (VlGMM * self,
00092 void const * priors);
00093
00094 VL_EXPORT double
00095 vl_get_gmm_data_posteriors_f(float * posteriors,
00096 vl_size numClusters,
00097 vl_size numData,
00098 float const * priors,
00099 float const * means,
00100 vl_size dimension,
00101 float const * covariances,
00102 float const * data) ;
00103
00104 VL_EXPORT double
00105 vl_get_gmm_data_posteriors_d(double * posteriors,
00106 vl_size numClusters,
00107 vl_size numData,
00108 double const * priors,
00109 double const * means,
00110 vl_size dimension,
00111 double const * covariances,
00112 double const * data) ;
00118 VL_EXPORT void vl_gmm_set_num_repetitions (VlGMM * self, vl_size numRepetitions) ;
00119 VL_EXPORT void vl_gmm_set_max_num_iterations (VlGMM * self, vl_size maxNumIterations) ;
00120 VL_EXPORT void vl_gmm_set_verbosity (VlGMM * self, int verbosity) ;
00121 VL_EXPORT void vl_gmm_set_initialization (VlGMM * self, VlGMMInitialization init);
00122 VL_EXPORT void vl_gmm_set_kmeans_init_object (VlGMM * self, VlKMeans * kmeans);
00123 VL_EXPORT void vl_gmm_set_covariance_lower_bounds (VlGMM * self, double const * bounds);
00124 VL_EXPORT void vl_gmm_set_covariance_lower_bound (VlGMM * self, double bound) ;
00130 VL_EXPORT void const * vl_gmm_get_means (VlGMM const * self);
00131 VL_EXPORT void const * vl_gmm_get_covariances (VlGMM const * self);
00132 VL_EXPORT void const * vl_gmm_get_priors (VlGMM const * self);
00133 VL_EXPORT void const * vl_gmm_get_posteriors (VlGMM const * self);
00134 VL_EXPORT vl_type vl_gmm_get_data_type (VlGMM const * self);
00135 VL_EXPORT vl_size vl_gmm_get_dimension (VlGMM const * self);
00136 VL_EXPORT vl_size vl_gmm_get_num_repetitions (VlGMM const * self);
00137 VL_EXPORT vl_size vl_gmm_get_num_data (VlGMM const * self);
00138 VL_EXPORT vl_size vl_gmm_get_num_clusters (VlGMM const * self);
00139 VL_EXPORT double vl_gmm_get_loglikelihood (VlGMM const * self);
00140 VL_EXPORT int vl_gmm_get_verbosity (VlGMM const * self);
00141 VL_EXPORT vl_size vl_gmm_get_max_num_iterations (VlGMM const * self);
00142 VL_EXPORT vl_size vl_gmm_get_num_repetitions (VlGMM const * self);
00143 VL_EXPORT VlGMMInitialization vl_gmm_get_initialization (VlGMM const * self);
00144 VL_EXPORT VlKMeans * vl_gmm_get_kmeans_init_object (VlGMM const * self);
00145 VL_EXPORT double const * vl_gmm_get_covariance_lower_bounds (VlGMM const * self);
00148
00149 #endif