public class PolynomialHierarchicalClusteringTrainer
Hierarchical clustering training algorithm
Reference: Stephen C. Johnson, 1967, "Hierarchical clustering schemes", Proc. Psychometrika, Vol. 32 No. 3, pp. 241-254.
This version is adapted to work with a distance function between polynomials.
This function clusters polynomials using Hierarchical (agglomerative approach) clustering procedure, using a polynomial
distance function. Training consists of four steps: 1. Convert object features to distance matrix. 2. Set each object as a
cluster (thus if we have 6 objects, we will have 6 clusters in the beginning) 3. Iterate until number of clusters is equal
to the given target number of clusters - Merge two closest clusters - Update distance matrix
tagetClusterSize - the target cluster size
linkageType - the linkage type used for Hierarchical clustering ('Average', 'Complete', or 'Short')