|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.clusterers.AbstractClusterer
public abstract class AbstractClusterer
Abstract clusterer.
| Constructor Summary | |
|---|---|
AbstractClusterer()
|
|
| Method Summary | |
|---|---|
abstract void |
buildClusterer(Instances data)
Generates a clusterer. |
int |
clusterInstance(Instance instance)
Classifies a given instance. |
double[] |
distributionForInstance(Instance instance)
Predicts the cluster memberships for a given instance. |
static Clusterer |
forName(java.lang.String clustererName,
java.lang.String[] options)
Creates a new instance of a clusterer given it's class name and (optional) arguments to pass to it's setOptions method. |
Capabilities |
getCapabilities()
Returns the Capabilities of this clusterer. |
java.lang.String |
getRevision()
Returns the revision string. |
static Clusterer[] |
makeCopies(Clusterer model,
int num)
Creates copies of the current clusterer. |
static Clusterer |
makeCopy(Clusterer model)
Creates a deep copy of the given clusterer using serialization. |
abstract int |
numberOfClusters()
Returns the number of clusters. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractClusterer()
| Method Detail |
|---|
public abstract void buildClusterer(Instances data)
throws java.lang.Exception
buildClusterer in interface Clustererdata - set of instances serving as training data
java.lang.Exception - if the clusterer has not been
generated successfully
public int clusterInstance(Instance instance)
throws java.lang.Exception
clusterInstance in interface Clustererinstance - the instance to be assigned to a cluster
java.lang.Exception - if instance could not be clustered
successfully
public double[] distributionForInstance(Instance instance)
throws java.lang.Exception
distributionForInstance in interface Clustererinstance - the instance to be assigned a cluster.
java.lang.Exception - if distribution could not be
computed successfully
public abstract int numberOfClusters()
throws java.lang.Exception
numberOfClusters in interface Clustererjava.lang.Exception - if number of clusters could not be returned
successfully
public static Clusterer forName(java.lang.String clustererName,
java.lang.String[] options)
throws java.lang.Exception
clustererName - the fully qualified class name of the clustereroptions - an array of options suitable for passing to setOptions. May
be null.
java.lang.Exception - if the clusterer class name is invalid, or the
options supplied are not acceptable to the clusterer.
public static Clusterer makeCopy(Clusterer model)
throws java.lang.Exception
model - the clusterer to copy
java.lang.Exception - if an error occurs
public static Clusterer[] makeCopies(Clusterer model,
int num)
throws java.lang.Exception
model - an example clusterer to copynum - the number of clusterer copies to create.
java.lang.Exception - if an error occurspublic Capabilities getCapabilities()
getCapabilities in interface ClusterergetCapabilities in interface CapabilitiesHandlerCapabilitiespublic java.lang.String getRevision()
getRevision in interface RevisionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||