|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.clusterers.Clusterer
Abstract clusterer.
Constructor Summary | |
Clusterer()
|
Method Summary | |
abstract void |
buildClusterer(Instances data)
Generates a clusterer. |
abstract int |
clusterInstance(Instance instance)
Classifies a given instance. |
static Clusterer |
forName(String clustererName,
String[] options)
Creates a new instance of a clusterer given it's class name and (optional) arguments to pass to it's setOptions method. |
static Clusterer[] |
makeCopies(Clusterer model,
int num)
Creates copies of the current clusterer. |
abstract int |
numberOfClusters()
Returns the number of clusters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Clusterer()
Method Detail |
public abstract void buildClusterer(Instances data) throws Exception
data
- set of instances serving as training data
Exception
- if the clusterer has not been
generated successfullypublic abstract int clusterInstance(Instance instance) throws Exception
instance
- the instance to be assigned to a cluster
Exception
- if instance could not be classified
successfullypublic abstract int numberOfClusters() throws Exception
Exception
- if number of clusters could not be returned
successfullypublic static Clusterer forName(String clustererName, String[] options) throws Exception
options
- an array of options suitable for passing to setOptions. May
be null.
Exception
- if the clusterer class name is invalid, or the
options supplied are not acceptable to the clusterer.public static Clusterer[] makeCopies(Clusterer model, int num) throws Exception
model
- an example clusterer to copynum
- the number of clusterer copies to create.
Exception
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |