Class Ai4r::Clusterers::Diana
In: lib/ai4r/clusterers/diana.rb
Parent: Clusterer

DIANA (Divisive ANAlysis) (Kaufman and Rousseeuw, 1990; Macnaughton - Smith et al. 1964) is a Divisive Hierarchical Clusterer. It begins with only one cluster with all data items, and divides the clusters until the desired clusters number is reached.

Methods

Attributes

clusters  [R] 
data_set  [R] 
number_of_clusters  [R] 

Public Class methods

Public Instance methods

Build a new clusterer, using divisive analysis (DIANA algorithm)

Classifies the given data item, returning the cluster index it belongs to (0-based).

Protected Instance methods

Max distance between 2 items in a cluster

Sum up the distance between an item and all the items in a cluster

Create a cluster with the item with mx distance to the rest of the cluster‘s items. That item is removed from the initial cluster.

return the cluster with max diameter

Return the max average distance between any item of cluster_to_split and the rest of items in that cluster, minus the average distance with the items of splinter_cluster, and the index of the item. A positive value means that the items is closer to the splinter group than to its current cluster.

[Validate]