|
||||||||||
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 Cluster
s.
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 Cluster s 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)
Clusters
cluster
to Clusters
add
in interface Clusters
public Cluster get(int index)
SimpleClusters
index
get
in interface SimpleClusters
get
in class AbstractSimpleClusters
public void setSize(int size)
Clusters
Cluster
s in Clusters
setSize
in interface Clusters
public Cluster set(int index, Cluster cluster)
Clusters
index
to cluster
set
in interface Clusters
public int size()
SimpleClusters
size
in interface SimpleClusters
size
in class AbstractSimpleClusters
public void removeElementAt(int index)
Clusters
index
removeElementAt
in interface Clusters
public void remove(Cluster cluster)
Clusters
cluster
remove
in interface Clusters
public Iterator iterator()
SimpleClusters
iterator
in interface SimpleClusters
iterator
in class AbstractSimpleClusters
public void reIndex()
Clusters
reIndex
in interface Clusters
public Object clone()
SimpleClusters
clone
in interface SimpleClusters
clone
in class AbstractSimpleClusters
public double getScore()
Clusters
getScore
in interface Clusters
public void merge(int i, int j)
merge
in interface Clusters
public void clearData()
Clusters
clearData
in interface Clusters
public void logOddsTransform()
Clusters
logOddsTransform
in interface Clusters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |