22 "batch size not set to positive value. Current batch size %d \n", batch_size);
24 "number of iterations not set to positive value. Current iterations %d \n", minib_iter);
37 for (int32_t i=0; i<minib_iter; i++)
41 for (int32_t j=0; j<batch_size; j++)
44 for (int32_t p=0; p<k; p++)
49 for (int32_t p=1; p<k; p++)
59 for (int32_t j=0; j<batch_size; j++)
61 int32_t near=ncent[j];
66 for (int32_t c=0; c<dims; c++)
68 c_alive[c]=(1.0-eta)*c_alive[c]+eta*x[c];
float distance(CJLCoverTreePoint p1, CJLCoverTreePoint p2, float64_t upper_bound)
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)
virtual int32_t get_num_vectors() const
CFeatures * replace_rhs(CFeatures *rhs)
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)
static void minibatch_KMeans(int32_t k, CDistance *distance, int32_t batch_size, int32_t minib_iter, SGMatrix< float64_t > mus)