All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.ClassificationViaRegression

java.lang.Object
   |
   +----weka.classifiers.Classifier
           |
           +----weka.classifiers.DistributionClassifier
                   |
                   +----weka.classifiers.ClassificationViaRegression

public class ClassificationViaRegression
extends DistributionClassifier
implements OptionHandler
Class for doing classification using regression methods. For more information, see

E. Frank, Y. Wang, S. Inglis, G. Holmes, and I.H. Witten (1998) "Using model trees for classification", Machine Learning, Vol.32, No.1, pp. 63-76.

Valid options are:

-W classname
Specify the full class name of a numeric predictor as the basis for the classifier (required).

Version:
$Revision: 1.4 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz), Len Trigg (trigg@cs.waikato.ac.nz)

Constructor Index

 o ClassificationViaRegression()

Method Index

 o buildClassifier(Instances)
Builds the classifiers.
 o distributionForInstance(Instance)
Returns the distribution for an instance.
 o getClassifier()
Get the base classifier (regression scheme) used as the classifier
 o getOptions()
Gets the current settings of the Classifier.
 o listOptions()
Returns an enumeration describing the available options
 o main(String[])
Main method for testing this class.
 o setClassifier(Classifier)
Set the base classifier.
 o setOptions(String[])
Sets a given list of options.
 o toString()
Prints the classifiers.

Constructors

 o ClassificationViaRegression
 public ClassificationViaRegression()

Methods

 o 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
 o 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
 o toString
 public String toString()
Prints the classifiers.

Overrides:
toString in class Object
 o listOptions
 public Enumeration listOptions()
Returns an enumeration describing the available options

Returns:
an enumeration of all the available options
 o setOptions
 public void setOptions(String options[]) throws Exception
Sets a given list of options. Valid options are:

-W classname
Specify the full class name of a numeric predictor as the basis for the classifier (required).

Parameters:
options - the list of options as an array of strings
Throws: Exception
if an option is not supported
 o getOptions
 public String[] getOptions()
Gets the current settings of the Classifier.

Returns:
an array of strings suitable for passing to setOptions
 o setClassifier
 public void setClassifier(Classifier newClassifier)
Set the base classifier.

Parameters:
newClassifier - the Classifier to use.
 o getClassifier
 public Classifier getClassifier()
Get the base classifier (regression scheme) used as the classifier

Returns:
the classifier used as the classifier
 o main
 public static void main(String argv[])
Main method for testing this class.

Parameters:
argv - the options for the learner

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home