K Means clustering functions. More...
Go to the source code of this file.
Functions | |
unsigned | mbl_k_means (mbl_data_wrapper< vnl_vector< double > > &data, unsigned k, vcl_vector< vnl_vector< double > > *cluster_centres, vcl_vector< unsigned > *partition=0) |
Find k cluster centres. | |
unsigned | mbl_k_means_weighted (mbl_data_wrapper< vnl_vector< double > > &data, unsigned k, const vcl_vector< double > &wts, vcl_vector< vnl_vector< double > > *cluster_centres, vcl_vector< unsigned > *partition=0) |
Find k cluster centres with weighted data. |
unsigned mbl_k_means | ( | mbl_data_wrapper< vnl_vector< double > > & | data, |
unsigned | k, | ||
vcl_vector< vnl_vector< double > > * | cluster_centres, | ||
vcl_vector< unsigned > * | partition | ||
) |
Find k cluster centres.
Uses batch k-means clustering. If you provide parameter partition, it will return the cluster index for each data sample. The number of iterations performed is returned.
Definition at line 30 of file mbl_k_means.cxx.
unsigned mbl_k_means_weighted | ( | mbl_data_wrapper< vnl_vector< double > > & | data, |
unsigned | k, | ||
const vcl_vector< double > & | wts, | ||
vcl_vector< vnl_vector< double > > * | cluster_centres, | ||
vcl_vector< unsigned > * | partition | ||
) |
Find k cluster centres with weighted data.
Uses batch k-means clustering. If you provide parameter partition, it will return the cluster index for each data sample. The number of iterations performed is returned.
Uses batch k-means clustering. If you provide parameter partition, it will return the cluster index for each data sample. The number of iterations performed is returned.
Definition at line 191 of file mbl_k_means.cxx.