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

Class weka.classifiers.trees.m5.M5P

java.lang.Object
    |
    +----weka.classifiers.Classifier
            |
            +----weka.classifiers.trees.m5.M5Base
                    |
                    +----weka.classifiers.trees.m5.M5P

public class M5P
extends M5Base
implements Drawable
M5P. Implements routines for generating M5 model trees. Valid options are:

-U
Use unsmoothed predictions.

Version:
$Revision: 1.3 $
Author:
Mark Hall

Constructor Index

 o M5P()
Creates a new M5P instance.

Method Index

 o getOptions()
Gets the current settings of the classifier.
 o getSaveInstances()
Get whether instance data is being save.
 o graph()
Return a dot style String describing the tree.
 o listOptions()
Returns an enumeration describing the available options
 o main(String[])
Main method by which this class can be tested
 o setOptions(String[])
Parses a given list of options.
 o setSaveInstances(boolean)
Set whether to save instance data at each node in the tree for visualization purposes

Constructor Detail

 o M5P
public M5P()
          Creates a new M5P instance.

Method Detail

 o graph
public java.lang.String graph() throws java.lang.Exception
          Return a dot style String describing the tree.
Returns:
a String value
Throws:
java.lang.Exception - if an error occurs
 o setSaveInstances
public void setSaveInstances(boolean save)
          Set whether to save instance data at each node in the tree for visualization purposes
Parameters:
save - a boolean value
 o getSaveInstances
public boolean getSaveInstances()
          Get whether instance data is being save.
Returns:
a boolean value
 o listOptions
public java.util.Enumeration listOptions()
          Returns an enumeration describing the available options
Returns:
an enumeration of all the available options
Overrides:
listOptions in class M5Base
 o setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
          Parses a given list of options.

Valid options are:

-U
Use unsmoothed predictions.

-R
Build a regression tree rather than a model tree.

-L
Save instance data at each node (for visualization purposes).

Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported
Overrides:
setOptions in class M5Base
 o getOptions
public java.lang.String[] getOptions()
          Gets the current settings of the classifier.
Returns:
an array of strings suitable for passing to setOptions
Overrides:
getOptions in class M5Base
 o main
public static void main(java.lang.String args[])
          Main method by which this class can be tested
Parameters:
args - an array of options

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