Class | Ai4r::Clusterers::WeightedAverageLinkage |
In: |
lib/ai4r/clusterers/weighted_average_linkage.rb
|
Parent: | SingleLinkage |
Implementation of an Agglomerative Hierarchical clusterer with weighted average linkage algorithm, aka weighted pair group method average or WPGMA (Jain and Dubes, 1988 ; McQuitty, 1966 ) Hierarchical clusteres create one cluster per element, and then progressively merge clusters, until the required number of clusters is reached. Similar to AverageLinkage, but the distances between clusters are weighted based on the number of data items in each of them.
D(cx, (ci U cj)) = ( ni * D(cx, ci) + nj * D(cx, cj)) / (ni + nj)
Build a new clusterer, using data examples found in data_set. Items will be clustered in "number_of_clusters" different clusters.
This algorithms does not allow classification of new data items once it has been built. Rebuild the cluster including you data element.