|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--weka.clusterers.Clusterer
|
+--weka.clusterers.DistributionClusterer
|
+--weka.clusterers.DistributionMetaClusterer
Class that wraps up a Clusterer and presents it as a DistributionClusterer for ease of programmatically handling Clusterers in general -- only the one predict method (distributionForInstance) need be worried about. The distributions produced by this clusterer place a probability of 1 on the class value predicted by the sub-clusterer.
Valid options are:
-W classname
Specify the full class name of a sub-clusterer (required).
| Constructor Summary | |
DistributionMetaClusterer()
|
|
| Method Summary | |
void |
buildClusterer(Instances insts)
Builds the clusterer. |
double |
densityForInstance(Instance inst)
Returns the density for an instance. |
double[] |
distributionForInstance(Instance inst)
Returns the distribution for an instance. |
Clusterer |
getClusterer()
Get the clusterer used as the clusterer |
java.lang.String[] |
getOptions()
Gets the current settings of the Clusterer. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
int |
numberOfClusters()
Returns the number of clusters. |
void |
setClusterer(Clusterer newClusterer)
Set the base clusterer. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Prints the clusterers. |
| Methods inherited from class weka.clusterers.DistributionClusterer |
clusterInstance |
| Methods inherited from class weka.clusterers.Clusterer |
forName, makeCopies |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DistributionMetaClusterer()
| Method Detail |
public void buildClusterer(Instances insts)
throws java.lang.Exception
buildClusterer in class Clustererinsts - the training data.java.lang.Exception - if a clusterer can't be built
public double[] distributionForInstance(Instance inst)
throws java.lang.Exception
distributionForInstance in class DistributionClustererjava.lang.Exception - if the distribution can't be computed successfully
public double densityForInstance(Instance inst)
throws java.lang.Exception
densityForInstance in class DistributionClustererjava.lang.Exception - if the distribution can't be computed successfully
public int numberOfClusters()
throws java.lang.Exception
numberOfClusters in class Clustererjava.lang.Exception - if number of clusters could not be returned
successfullypublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-W classname
Specify the full class name of a learner as the basis for
the multiclassclusterer (required).
setOptions in interface OptionHandleroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic void setClusterer(Clusterer newClusterer)
newClusterer - the Clusterer to use.public Clusterer getClusterer()
public static void main(java.lang.String[] argv)
argv - the options
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||