All Packages Class Hierarchy This Package Previous Next Index WEKA's home
java.lang.Object | +----weka.classifiers.Classifier | +----weka.classifiers.m5.M5Prime
Reference: Wang, Y. and Witten, I.H. (1997). Induction of model trees for predicting continuous classes. Proceedings of the poster papers of the European Conference on Machine Learning. University of Economics, Faculty of Informatics and Statistics, Prague.
Valid options are:
-O
-U
-F factor
-V <0|1|2>
-O
-U
-F factor
-V <0|1|2>
Type of model to be used. (l: linear regression,
r: regression tree, m: model tree) (default: m)
Use unsmoothed tree.
Set pruning factor (default: 2).
Verbosity (default: 0).
M5Prime()
buildClassifier(Instances)
classifyInstance(Instance)
enumerateMeasures()
getMeasure(String)
getModelType()
getOptions()
getPruningFactor()
getUseUnsmoothed()
getVerbosity()
listOptions()
main(String[])
measureNumLeaves()
measureNumLinearModels()
measureNumRules()
setModelType(SelectedTag)
setOptions(String[])
setPruningFactor(double)
setUseUnsmoothed(boolean)
setVerbosity(int)
toString()
MODEL_LINEAR_REGRESSION
public static final int MODEL_LINEAR_REGRESSION
MODEL_REGRESSION_TREE
public static final int MODEL_REGRESSION_TREE
MODEL_MODEL_TREE
public static final int MODEL_MODEL_TREE
TAGS_MODEL_TYPES
public static final Tag[] TAGS_MODEL_TYPES
M5Prime
public M5Prime()
buildClassifier
public final void buildClassifier(Instances inst) throws java.lang.Exception
Construct a model tree by training instances
inst
- training instances
options
- information for constructing the model tree,
mostly from command line options
classifyInstance
public double classifyInstance(Instance ins) throws java.lang.Exception
Classifies the given test instance.
instance
- the instance to be classified
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options.
Valid options are:
Type of model to be used. (l: linear regression,
r: regression tree, m: model tree) (default: m)
Use unsmoothed tree.
Set pruning factor (default: 2).
Verbosity (default: 0).
setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
Parses a given list of options.
options
- the list of options as an array of strings
getOptions
public java.lang.String[] getOptions()
Gets the current settings of the Classifier.
toString
public final java.lang.String toString()
Converts the output of the training process into a string
measureNumLinearModels
public double measureNumLinearModels()
return the number of linear models
measureNumLeaves
public double measureNumLeaves()
return the number of leaves in the tree
measureNumRules
public double measureNumRules()
return the number of rules
enumerateMeasures
public java.util.Enumeration enumerateMeasures()
Returns an enumeration of the additional measure names
getMeasure
public double getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure
measureName
- the name of the measure to query for its value
getUseUnsmoothed
public boolean getUseUnsmoothed()
Get the value of UseUnsmoothed.
setUseUnsmoothed
public void setUseUnsmoothed(boolean v)
Set the value of UseUnsmoothed.
v
- Value to assign to UseUnsmoothed.
getPruningFactor
public double getPruningFactor()
Get the value of PruningFactor.
setPruningFactor
public void setPruningFactor(double v)
Set the value of PruningFactor.
v
- Value to assign to PruningFactor.
getModelType
public SelectedTag getModelType()
Get the value of Model.
setModelType
public void setModelType(SelectedTag newMethod)
Set the value of Model.
v
- Value to assign to Model.
getVerbosity
public int getVerbosity()
Get the value of Verbosity.
setVerbosity
public void setVerbosity(int v)
Set the value of Verbosity.
v
- Value to assign to Verbosity.
main
public static void main(java.lang.String argv[])
Main method for M5' algorithm
argv
- command line arguments
All Packages Class Hierarchy This Package Previous Next Index WEKA's home