|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.stanford.nlp.cluster.AbstractSimpleClusters
|
+--edu.stanford.nlp.cluster.VectorClusters
Simple implementation of Clusters.
Stores Clusters as a vector of Clusters.
| Field Summary | |
protected Vector |
clusters
|
| Fields inherited from class edu.stanford.nlp.cluster.AbstractSimpleClusters |
score |
| Constructor Summary | |
VectorClusters()
constructs a Clusters |
|
VectorClusters(int size)
constructs a Clusters of given size |
|
| Method Summary | |
boolean |
add(Cluster cluster)
Adds cluster to Clusters |
void |
clearData()
Clears the Data from all clusters |
Object |
clone()
Returns deep copy of Clusters |
Cluster |
get(int index)
Returns Cluster with index index |
double |
getScore()
Returns score, if score has already been computed |
Iterator |
iterator()
Returns an iterator of Clusters |
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 by taking the weighted average of probability distributions over data and features (and adding the cluster probabilities) and stores the merged cluster into the slot with 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 |
int |
size()
Returns number of clusters |
| Methods inherited from class edu.stanford.nlp.cluster.AbstractSimpleClusters |
equals, evaluateInterSimilarity, pr_w_d, score, toString, toXMLString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.stanford.nlp.cluster.SimpleClusters |
equals, evaluateInterSimilarity, pr_w_d, score, toString, toXMLString |
| Field Detail |
protected Vector clusters
| Constructor Detail |
public VectorClusters(int size)
public VectorClusters()
| Method Detail |
public boolean add(Cluster cluster)
Clusterscluster to Clusters
add in interface Clusterspublic Cluster get(int index)
SimpleClustersindex
get in interface SimpleClustersget in class AbstractSimpleClusterspublic void setSize(int size)
ClustersClusters in Clusters
setSize in interface Clusters
public Cluster set(int index,
Cluster cluster)
Clustersindex to cluster
set in interface Clusterspublic int size()
SimpleClusters
size in interface SimpleClusterssize in class AbstractSimpleClusterspublic void removeElementAt(int index)
Clustersindex
removeElementAt in interface Clusterspublic void remove(Cluster cluster)
Clusterscluster
remove in interface Clusterspublic Iterator iterator()
SimpleClusters
iterator in interface SimpleClustersiterator in class AbstractSimpleClusterspublic void reIndex()
Clusters
reIndex in interface Clusterspublic Object clone()
SimpleClusters
clone in interface SimpleClustersclone in class AbstractSimpleClusterspublic double getScore()
Clusters
getScore in interface Clusters
public void merge(int i,
int j)
merge in interface Clusterspublic void clearData()
Clusters
clearData in interface Clusterspublic void logOddsTransform()
Clusters
logOddsTransform in interface Clusters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||