edu.umass.cs.mallet.base.cluster
Class Clustering

java.lang.Object
  extended byedu.umass.cs.mallet.base.cluster.Clustering

public class Clustering
extends java.lang.Object


Constructor Summary
Clustering(InstanceList instances, int numLabels, int[] labels)
          Clustering constructor.
 
Method Summary
 InstanceList getCluster(int label)
          Return an list of instances with a particular label.
 InstanceList[] getClusters()
          Returns an array of instance lists corresponding to clusters.
 int getLabel(int index)
          Get the cluster label for a particular instance.
 int getNumClusters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Clustering

public Clustering(InstanceList instances,
                  int numLabels,
                  int[] labels)
Clustering constructor.

Parameters:
instances - Instances that are clustered
numLabels - Number of clusters
labels - Assignment of instances to clusters; many-to-one with range [0,numLabels).
Method Detail

getNumClusters

public int getNumClusters()

getLabel

public int getLabel(int index)
Get the cluster label for a particular instance.


getCluster

public InstanceList getCluster(int label)
Return an list of instances with a particular label.


getClusters

public InstanceList[] getClusters()
Returns an array of instance lists corresponding to clusters.