All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.clusterers.Clusterer
java.lang.Object
|
+----weka.clusterers.Clusterer
- public abstract class Clusterer
- extends Object
- implements Cloneable, Serializable
Abstract clusterer.
- Version:
- $Revision: 1.3 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
-
Clusterer()
-
-
buildClusterer(Instances)
- Generates a clusterer.
-
clusterInstance(Instance)
- Classifies a given instance.
-
forName(String, String[])
- Creates a new instance of a clusterer given it's class name and
(optional) arguments to pass to it's setOptions method.
-
numberOfClusters()
- Returns the number of clusters.
Clusterer
public Clusterer()
buildClusterer
public abstract void buildClusterer(Instances data) throws Exception
- Generates a clusterer. Has to initialize all fields of the clusterer
that are not being set via options.
- Parameters:
- data - set of instances serving as training data
- Throws: Exception
- if the clusterer has not been
generated successfully
clusterInstance
public abstract int clusterInstance(Instance instance) throws Exception
- Classifies a given instance.
- Parameters:
- instance - the instance to be assigned to a cluster
- Returns:
- the number of the assigned cluster as an interger
if the class is enumerated, otherwise the predicted value
- Throws: Exception
- if instance could not be classified
successfully
numberOfClusters
public abstract int numberOfClusters() throws Exception
- Returns the number of clusters.
- Returns:
- the number of clusters generated for a training dataset.
- Throws: Exception
- if number of clusters could not be returned
successfully
forName
public static Clusterer forName(String clustererName,
String options[]) throws Exception
- Creates a new instance of a clusterer given it's class name and
(optional) arguments to pass to it's setOptions method. If the
clusterer implements OptionHandler and the options parameter is
non-null, the clusterer will have it's options set.
- Parameters:
- searchName - the fully qualified class name of the clusterer
- options - an array of options suitable for passing to setOptions. May
be null.
- Returns:
- the newly created search object, ready for use.
- Throws: Exception
- if the clusterer class name is invalid, or the
options supplied are not acceptable to the clusterer.
All Packages Class Hierarchy This Package Previous Next Index WEKA's home