public class PolynomialKMeansClusteringTrainer
K-Means clustering training algorithm
Reference: J. MacQueen, 1967, "Some methods for classification and analysis of multivariate observations", Proc. Fifth Berkeley
Symp. on Math. Statist. and Prob., Vol. 1 (Univ. of Calif. Press, 1967), pp. 281-297.
This version is adapted to work with a distance function between polynomials.
This function clusters polynomials using K-Means clustering procedure, using a polynomial distance function. Training
consists of four steps: (a) Initialization (random assignment of cluster means using data points that are far away from
each other + slight random shifts) (b) Hard clustering of samples according to new cluster means (c) Update of cluster
means using assigned samples (d) Re-iteration of (b) and (c) until convergence, i.e. when overall cluster occupancy does
not change much
polynomials - the observations to cluster
kmeansParams - All training parameters are given by kmeansParams (See KMeansClusteringTrainerParams.java for details)