Packageflare.analytics.cluster
Classpublic class AgglomerativeCluster
InheritanceAgglomerativeCluster Inheritance HierarchicalCluster Inheritance Operator

Hierarchically clusters a set of items using agglomerative clustering. This approach continually merges the most similar items (those with the minimum distance between them) into clusters, until all items have been merged into a final resulting cluster tree. Clients must provide a distance function that takes as input two DataSprite instances and returns a Number.

This class supports both minimum-link clustering, in which the distance between clusters is measured as the distance between the two nearest items in each cluster, and maximum-link clustering, in which distance is measured using the two furthest items in each cluster.

For a richer description, see the Wikipedia article on Cluster Analysis.



Public Properties
 PropertyDefined by
 InheritedclusterField : String
The property in which to store cluster indices.
HierarchicalCluster
 InheritedclusterTree : Tree
The cluster tree of detected community structures.
HierarchicalCluster
 Inheritedcriteria : Array
Computed criterion values for each merge in the cluster tree.
HierarchicalCluster
  distance : Function = null
A function defining distances between items.
AgglomerativeCluster
 Inheritedenabled : Boolean
Indicates if the operator is enabled or disabled.
Operator
 Inheritedgroup : String
The data group to cluster.
HierarchicalCluster
  minLink : Boolean = true
If true, minimum-link distances are computed between clusters.
AgglomerativeCluster
 Inheritedparameters : Object
Sets parameter values for this operator.
Operator
 InheritedsequenceField : String
The property in which to store sequence indices.
HierarchicalCluster
 Inheritedvisualization : Visualization
The visualization processed by this operator.
Operator
Public Methods
 MethodDefined by
  
AgglomerativeCluster(group:String)
Creates a new agglomerative cluster instance
AgglomerativeCluster
 Inherited
applyParameters(op:IOperator, params:Object):void
[static] Static method that applies parameter settings to an operator.
Operator
  
calculate(list:DataList, d:Function):void
Calculates the community structure clustering.
AgglomerativeCluster
 Inherited
labelNodes(merge:int = -1):void
Labels nodes with their cluster membership, determined by the given merge number.
HierarchicalCluster
  
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
AgglomerativeCluster
 Inherited
setup():void
Setup method invoked whenever this operator's visualization property is set.
Operator
Property detail
distanceproperty
public var distance:Function = null

A function defining distances between items.

minLinkproperty 
public var minLink:Boolean = true

If true, minimum-link distances are computed between clusters. If false, maximum-link distances are computed between clusters.

Constructor detail
AgglomerativeCluster()constructor
public function AgglomerativeCluster(group:String)

Creates a new agglomerative cluster instance

Parameters
group:String
Method detail
calculate()method
public function calculate(list:DataList, d:Function):void

Calculates the community structure clustering. As a result of this method, a cluster tree will be computed and graph nodes will be annotated with both community and sequence indices.

Parameters
list:DataList — a data list to cluster
 
d:Function — a distance function
operate()method 
public override function operate(t:Transitioner = null):void

Performs an operation over the contents of a visualization.

Parameters
t:Transitioner (default = null) — a Transitioner instance for collecting value updates.