40 REQUIRE(b>0,
"Parameter bach size should be > 0");
51 REQUIRE(i>0,
"Parameter number of iterations should be > 0");
62 REQUIRE(b>0,
"Parameter bach size should be > 0");
63 REQUIRE(t>0,
"Parameter number of iterations should be > 0");
71 "batch size not set to positive value. Current batch size %d \n",
batch_size);
73 "number of iterations not set to positive value. Current iterations %d \n",
minib_iter);
93 for (int32_t p=0; p<
k; p++)
98 for (int32_t p=1; p<
k; p++)
110 int32_t near=ncent[j];
115 for (int32_t c=0; c<dims; c++)
117 c_alive[c]=(1.0-eta)*c_alive[c]+eta*x[c];
145 void CKMeansMiniBatch::init_mb_params()
int32_t get_batch_size() const
ST * get_feature_vector(int32_t num, int32_t &len, bool &dofree)
Class Distance, a base class for all the distances used in the Shogun toolbox.
int32_t get_num_features() const
void set_feature_matrix(SGMatrix< ST > matrix)
SGMatrix< float64_t > mus
void compute_cluster_variances()
void initialize_training(CFeatures *data=NULL)
virtual int32_t get_num_vectors() const
void set_batch_size(int32_t b)
virtual ~CKMeansMiniBatch()
virtual bool train_machine(CFeatures *data=NULL)
void set_mb_iter(int32_t t)
virtual CFeatures * replace_rhs(CFeatures *rhs)
void set_mb_params(int32_t b, int32_t t)
int32_t get_mb_iter() const
virtual float64_t distance(int32_t idx_a, int32_t idx_b)
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
static CDenseFeatures * obtain_from_generic(CFeatures *const base_features)