|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.cluster.AbstractClusteringMethod
Abstract implementation of ClusteringMethod. Subclasses must implement cluster() method.
Field Summary | |
protected Clusters |
clusters
vector of clusters |
protected DataCollection |
db
document database |
protected String |
method
label for method. |
protected int |
nc
number of clusters |
protected int |
nd
number of documents |
protected int |
nt
number of terms |
Constructor Summary | |
AbstractClusteringMethod()
|
Method Summary | |
SimpleClusters |
cluster(DataCollection data,
int num_clusters,
String filename)
Performs clustering algorithm, and prints clusters to file |
double |
evaluate(DataCollection data,
int num_clusters)
Performs clustering algorithm and returns the score of the resulting clusters. |
double |
evaluate(DataCollection data,
int num_clusters,
String filename)
Performs clustering algorithm, prints resulting clusters to file, and returns the score of the clusters. |
protected void |
initialize(DataCollection data)
sets values for db, nt, nd; |
String |
toString()
Returns String representation of Clustering Method, including clusters returned by clustering method |
String |
toXMLString()
Returns XML String representation of Clustering Method, including clusters returned by clustering method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.stanford.nlp.cluster.ClusteringMethod |
cluster |
Field Detail |
protected int nc
protected int nt
protected int nd
protected DataCollection db
protected Clusters clusters
protected String method
Constructor Detail |
public AbstractClusteringMethod()
Method Detail |
protected void initialize(DataCollection data)
public String toXMLString()
ClusteringMethod
toXMLString
in interface ClusteringMethod
public String toString()
ClusteringMethod
toString
in interface ClusteringMethod
toString
in class Object
public SimpleClusters cluster(DataCollection data, int num_clusters, String filename)
ClusteringMethod
cluster
in interface ClusteringMethod
public double evaluate(DataCollection data, int num_clusters)
ClusteringMethod
evaluate
in interface ClusteringMethod
public double evaluate(DataCollection data, int num_clusters, String filename)
ClusteringMethod
evaluate
in interface ClusteringMethod
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |