Implementation of a Hierarchical clusterer with complete linkage (Everitt et al., 2001 ; Jain and Dubes, 1988 ; Sorensen, 1948 ). Hierarchical clusteres create one cluster per element, and then progressively merge clusters, until the required number of clusters is reached. With complete linkage, the distance between two clusters is computed as the maximum distance between elements of each cluster.
D(cx, (ci U cj) = max(D(cx, ci), D(cx, cj))
# File lib/ai4r/clusterers/complete_linkage.rb, line 56 def distance_between_item_and_cluster(data_item, cluster) max_dist = 0 cluster.data_items.each do |another_item| dist = @distance_function.call(data_item, another_item) max_dist = dist if dist > max_dist end return max_dist end
Generated with the Darkfish Rdoc Generator 2.