45 REQUIRE(b>0,
"Parameter bach size should be > 0");
56 REQUIRE(i>0,
"Parameter number of iterations should be > 0");
67 REQUIRE(b>0,
"Parameter bach size should be > 0");
68 REQUIRE(t>0,
"Parameter number of iterations should be > 0");
76 "batch size not set to positive value. Current batch size %d \n",
batch_size);
78 "number of iterations not set to positive value. Current iterations %d \n",
minib_iter);
97 for (int32_t p=0; p<
k; p++)
102 for (int32_t p=1; p<
k; p++)
114 int32_t near=ncent[j];
119 for (int32_t c=0; c<dims; c++)
121 c_alive[c]=(1.0-eta)*c_alive[c]+eta*x[c];
149 void CKMeansMiniBatch::init_mb_params()
int32_t get_batch_size() const
Class Distance, a base class for all the distances used in the Shogun toolbox.
SGMatrix< float64_t > mus
ST * get_feature_vector(int32_t num, int32_t &len, bool &dofree)
void compute_cluster_variances()
void initialize_training(CFeatures *data=NULL)
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_num_features() const
virtual float64_t distance(int32_t idx_a, int32_t idx_b)
virtual int32_t get_num_vectors() const
all of classes and functions are contained in the shogun namespace
static CDenseFeatures * obtain_from_generic(CFeatures *const base_features)
int32_t get_mb_iter() const
The class Features is the base class of all feature objects.