edu.stanford.nlp.cluster
Interface Clusters

All Superinterfaces:
Cloneable, Serializable, SimpleClusters
All Known Implementing Classes:
VectorClusters

public interface Clusters
extends SimpleClusters

Interface for a collection of Clusters that span the entire data collection.


Method Summary
 boolean add(Cluster cluster)
          Adds cluster to Clusters
 void clearData()
          Clears the Data from all clusters
 double getScore()
          Returns score, if score has already been computed
 void logOddsTransform()
          transforms feature values to log-odds values, where the value of feature w in cluster z Value(w,z)=log2(P(w|z)/avg_over_clusters(P(w|z))).
 void merge(int i, int j)
          Merges clusters i and j and assigns the merged cluster the lower index.
 void reIndex()
          Re-indexes clusters.
 void remove(Cluster cluster)
          Removes Cluster cluster
 void removeElementAt(int index)
          Removes cluster at index index
 Cluster set(int index, Cluster cluster)
          Sets the value of index index to cluster
 void setSize(int size)
          Sets the the number of Clusters in Clusters
 
Methods inherited from interface edu.stanford.nlp.cluster.SimpleClusters
clone, equals, evaluateInterSimilarity, get, iterator, pr_w_d, score, size, toString, toXMLString
 

Method Detail

add

public boolean add(Cluster cluster)
Adds cluster to Clusters

Returns:
true if successful, false if not

setSize

public void setSize(int size)
Sets the the number of Clusters in Clusters


set

public Cluster set(int index,
                   Cluster cluster)
Sets the value of index index to cluster


removeElementAt

public void removeElementAt(int index)
Removes cluster at index index


remove

public void remove(Cluster cluster)
Removes Cluster cluster


reIndex

public void reIndex()
Re-indexes clusters. Useful after removing a cluster.


getScore

public double getScore()
Returns score, if score has already been computed


merge

public void merge(int i,
                  int j)
Merges clusters i and j and assigns the merged cluster the lower index.


clearData

public void clearData()
Clears the Data from all clusters


logOddsTransform

public void logOddsTransform()
transforms feature values to log-odds values, where the value of feature w in cluster z Value(w,z)=log2(P(w|z)/avg_over_clusters(P(w|z))).



Stanford NLP Group