|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.trees.m5.M5Base
public abstract class M5Base
M5Base. Implements base routines for generating M5 Model trees and rules.
The original algorithm M5 was invented by Quinlan:
Quinlan J. R. (1992). Learning with continuous classes. Proceedings of
the Australian Joint Conference on Artificial Intelligence. 343--348.
World Scientific, Singapore.
-U
Use unsmoothed predictions.
-R
Build regression tree/rule rather than model tree/rule
| Constructor Summary | |
|---|---|
M5Base()
Constructor |
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances data)
Generates the classifier. |
String |
buildRegressionTreeTipText()
Returns the tip text for this property |
double |
classifyInstance(Instance inst)
Calculates a prediction for an instance using a set of rules or an M5 model tree |
Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names |
String |
generateRulesTipText()
Returns the tip text for this property |
boolean |
getBuildRegressionTree()
Get the value of regressionTree. |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier, i.e., of LinearRegression. |
RuleNode |
getM5RootNode()
|
double |
getMeasure(String additionalMeasureName)
Returns the value of the named measure |
double |
getMinNumInstances()
Get the minimum number of instances to allow at a leaf node |
String[] |
getOptions()
Gets the current settings of the classifier. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
boolean |
getUnpruned()
Get whether unpruned tree/rules are being generated |
boolean |
getUseUnsmoothed()
Get whether or not smoothing is being used |
String |
globalInfo()
returns information about the classifier |
Enumeration |
listOptions()
Returns an enumeration describing the available options |
double |
measureNumRules()
return the number of rules |
String |
minNumInstancesTipText()
Returns the tip text for this property |
void |
setBuildRegressionTree(boolean newregressionTree)
Set the value of regressionTree. |
void |
setMinNumInstances(double minNum)
Set the minimum number of instances to allow at a leaf node |
void |
setOptions(String[] options)
Parses a given list of options. |
void |
setUnpruned(boolean unpruned)
Use unpruned tree/rules |
void |
setUseUnsmoothed(boolean s)
Use unsmoothed predictions |
String |
toString()
Returns a description of the classifier |
String |
unprunedTipText()
Returns the tip text for this property |
String |
useUnsmoothedTipText()
Returns the tip text for this property |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
debugTipText, distributionForInstance, forName, getDebug, getRevision, makeCopies, makeCopy, runClassifier, setDebug |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public M5Base()
| Method Detail |
|---|
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class AbstractClassifier
public void setOptions(String[] options)
throws Exception
-U
Use unsmoothed predictions.
-R
Build a regression tree rather than a model tree.
setOptions in interface OptionHandlersetOptions in class AbstractClassifieroptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class AbstractClassifierpublic String unprunedTipText()
public void setUnpruned(boolean unpruned)
unpruned - true if unpruned tree/rules are to be generatedpublic boolean getUnpruned()
public String generateRulesTipText()
public String useUnsmoothedTipText()
public void setUseUnsmoothed(boolean s)
s - true if unsmoothed predictions are to be usedpublic boolean getUseUnsmoothed()
public String buildRegressionTreeTipText()
public boolean getBuildRegressionTree()
public void setBuildRegressionTree(boolean newregressionTree)
newregressionTree - Value to assign to regressionTree.public String minNumInstancesTipText()
public void setMinNumInstances(double minNum)
minNum - the minimum number of instancespublic double getMinNumInstances()
double valuepublic Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilities
public void buildClassifier(Instances data)
throws Exception
buildClassifier in interface Classifierdata - set of instances serving as training data
Exception - if the classifier has not been generated
successfully
public double classifyInstance(Instance inst)
throws Exception
classifyInstance in interface ClassifierclassifyInstance in class AbstractClassifierinst - the instance whos class value is to be predicted
Exception - if a prediction can't be made.public String toString()
toString in class Objectpublic Enumeration enumerateMeasures()
enumerateMeasures in interface AdditionalMeasureProducerpublic double getMeasure(String additionalMeasureName)
getMeasure in interface AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its value
Exception - if the named measure is not supportedpublic double measureNumRules()
public RuleNode getM5RootNode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||