24 class CDistanceMachine;
74 virtual bool load(FILE* srcfile);
81 virtual bool save(FILE* dstfile);
87 void set_k(int32_t p_k);
126 virtual const char*
get_name()
const {
return "KMeans"; }
virtual const char * get_name() const
virtual bool save(FILE *dstfile)
Class Distance, a base class for all the distances used in the Shogun toolbox.
int32_t max_iter
maximum number of iterations
int32_t dimensions
number of dimensions
SGVector< float64_t > R
radi of the clusters (size k)
virtual bool set_initial_centers(SGVector< float64_t > centers)
A generic DistanceMachine interface.
void clustknb(bool use_old_mus, float64_t *mus_start)
virtual bool train_require_labels() const
SGVector< float64_t > get_radiuses()
KMeans clustering, partitions the data into k (a-priori specified) clusters.
SGVector< float64_t > mus_initial
initial centers supplied
#define MACHINE_PROBLEM_TYPE(PT)
virtual bool load(FILE *srcfile)
void set_max_iter(int32_t iter)
virtual EMachineType get_classifier_type()
The class Features is the base class of all feature objects.
virtual void store_model_features()
virtual bool train_machine(CFeatures *data=NULL)
int32_t k
the k parameter in KMeans
SGMatrix< float64_t > get_cluster_centers()