|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.cluster.AbstractClusteringMethod | +--edu.stanford.nlp.cluster.Kmeans
K-means Clustering Algorithm.
Field Summary |
Fields inherited from class edu.stanford.nlp.cluster.AbstractClusteringMethod |
clusters, db, method, nc, nd, nt |
Constructor Summary | |
Kmeans()
|
Method Summary | |
void |
assignData()
Assigns each data in data set to it closest mean |
void |
assignDatum(int index)
Assigns a datum to its closest mean |
SimpleClusters |
cluster(DataCollection data,
int num_clusters)
Clusters by performing 30 iterations |
void |
evaluateMeans()
Evaluates the means of each cluster |
void |
finish()
Finalizes clusters by setting P(w|z) to be the weighted mean of the documents in the cluster |
void |
initialize()
Initializes clusters by assigning each point randomly to a cluster |
void |
oneIteration()
Performs one iteration: a) Evaluates cluster means, b) Assigns each datum to its closest mean |
Methods inherited from class edu.stanford.nlp.cluster.AbstractClusteringMethod |
cluster, evaluate, evaluate, initialize, toString, toXMLString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Kmeans()
Method Detail |
public void initialize()
public void assignDatum(int index)
public void assignData()
public void evaluateMeans()
public void oneIteration()
public SimpleClusters cluster(DataCollection data, int num_clusters)
public void finish()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |