All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.MultiClassClassifier
java.lang.Object
|
+----weka.classifiers.Classifier
|
+----weka.classifiers.DistributionClassifier
|
+----weka.classifiers.MultiClassClassifier
- public class MultiClassClassifier
- extends DistributionClassifier
- implements OptionHandler, WeightedInstancesHandler
Class for handling multi-class datasets with 2-class distribution
classifiers.
Valid options are:
-W classname
Specify the full class name of a classifier as the basis for
the multi-class classifier (required).
- Version:
- $Revision: 1.7 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz), Len Trigg (trigg@cs.waikato.ac.nz)
-
MultiClassClassifier()
-
-
buildClassifier(Instances)
- Builds the classifiers.
-
distributionForInstance(Instance)
- Returns the distribution for an instance.
-
getClassifier()
- Get the classifier used as the classifier
-
getOptions()
- Gets the current settings of the Classifier.
-
listOptions()
- Returns an enumeration describing the available options
-
main(String[])
- Main method for testing this class.
-
setClassifier(Classifier)
- Set the base classifier.
-
setOptions(String[])
- Parses a given list of options.
-
toString()
- Prints the classifiers.
MultiClassClassifier
public MultiClassClassifier()
buildClassifier
public void buildClassifier(Instances insts) throws Exception
- Builds the classifiers.
- Parameters:
- insts - the training data.
- Throws: Exception
- if a classifier can't be built
- Overrides:
- buildClassifier in class Classifier
distributionForInstance
public double[] distributionForInstance(Instance inst) throws Exception
- Returns the distribution for an instance.
- Throws: Exception
- if the distribution can't be computed successfully
- Overrides:
- distributionForInstance in class DistributionClassifier
toString
public String toString()
- Prints the classifiers.
- Overrides:
- toString in class Object
listOptions
public Enumeration listOptions()
- Returns an enumeration describing the available options
- Returns:
- an enumeration of all the available options
setOptions
public void setOptions(String options[]) throws Exception
- Parses a given list of options. Valid options are:
-W classname
Specify the full class name of a learner as the basis for
the multiclassclassifier (required).
- Parameters:
- options - the list of options as an array of strings
- Throws: Exception
- if an option is not supported
getOptions
public String[] getOptions()
- Gets the current settings of the Classifier.
- Returns:
- an array of strings suitable for passing to setOptions
setClassifier
public void setClassifier(Classifier newClassifier)
- Set the base classifier.
- Parameters:
- newClassifier - the Classifier to use.
getClassifier
public Classifier getClassifier()
- Get the classifier used as the classifier
- Returns:
- the classifier used as the classifier
main
public static void main(String argv[])
- Main method for testing this class.
- Parameters:
- argv - the options
All Packages Class Hierarchy This Package Previous Next Index WEKA's home