Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.meta
Class ClassificationViaRegression

    java.lang.Object
      weka.classifiers.Classifier
          weka.classifiers.SingleClassifierEnhancer
              weka.classifiers.meta.ClassificationViaRegression

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, OptionHandler

    public class ClassificationViaRegression

extends SingleClassifierEnhancer

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.20 $
Author:
  Eibe Frank (eibe@cs.waikato.ac.nz), Len Trigg (trigg@cs.waikato.ac.nz)
See Also:
  Serialized Form

Constructor Summary
`ClassificationViaRegression()` Default constructor.

Method Summary
`void` | `buildClassifier(Instances insts)` Builds the classifiers.
`double[]` | `distributionForInstance(Instance inst)` Returns the distribution for an instance.
`java.lang.String` | `globalInfo()` Returns a string describing classifier
`static void` | `main(java.lang.String[] argv)` Main method for testing this class.
`java.lang.String` | `toString()` Prints the classifiers.

Methods inherited from class weka.classifiers.SingleClassifierEnhancer
`classifierTipText, getClassifier, getOptions, listOptions, setClassifier, setOptions`

Methods inherited from class weka.classifiers.Classifier
`classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ClassificationViaRegression

    public ClassificationViaRegression()

  Default constructor.

Method Detail

### globalInfo

    public java.lang.String globalInfo()

  Returns a string describing classifier

  Returns:
    a description suitable for displaying in the explorer/experimenter gui

### buildClassifier

    public void buildClassifier(Instances insts)
                         throws java.lang.Exception

  Builds the classifiers.

  Specified by:
    `buildClassifier` in class `Classifier`
  Parameters:
    `insts` - the training data.
  Throws:
    `java.lang.Exception` - if a classifier can't be built

### distributionForInstance

    public double[] distributionForInstance(Instance inst)
                                     throws java.lang.Exception

  Returns the distribution for an instance.

  Overrides:
    `distributionForInstance` in class `Classifier`
  Parameters:
    `inst` - the instance to be classified
  Returns:
    an array containing the estimated membership probabilities of the test instance in each class or the numeric prediction
  Throws:
    `java.lang.Exception` - if the distribution can't be computed successfully

### toString

    public java.lang.String toString()

  Prints the classifiers.

  Overrides:
    `toString` in class `java.lang.Object`

### main

    public static void main(java.lang.String[] argv)

  Main method for testing this class.

  Parameters:
    `argv` - the options for the learner

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD