|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.trees.m5.Rule
Generates a single m5 tree or rule
Constructor Summary | |
Rule()
Constructor declaration |
Method Summary | |
void |
buildClassifier(Instances data)
Generates a single rule or m5 model tree. |
double |
classifyInstance(Instance instance)
Calculates a prediction for an instance using this rule or M5 model tree |
RuleNode |
getM5RootNode()
|
double |
getMinNumInstances()
Get the minimum number of instances to allow at a leaf node |
boolean |
getRegressionTree()
Get the value of regressionTree. |
boolean |
getSmoothing()
Get whether or not smoothing has been turned on |
boolean |
getUnpruned()
Get whether unpruned tree/rules are being generated |
boolean |
getUseTree()
get whether an m5 tree is being used rather than rules |
Instances |
notCoveredInstances()
Get the instances not covered by this rule |
void |
setMinNumInstances(double minNum)
Set the minumum number of instances to allow at a leaf node |
void |
setRegressionTree(boolean newregressionTree)
Set the value of regressionTree. |
void |
setSmoothing(boolean s)
Smooth predictions |
void |
setUnpruned(boolean unpruned)
Use unpruned tree/rules |
void |
setUseTree(boolean u)
Use an m5 tree rather than generate rules |
RuleNode |
topOfTree()
Returns the top of the tree. |
java.lang.String |
toString()
Return a description of the m5 tree or rule |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Rule()
Method Detail |
public void buildClassifier(Instances data) throws java.lang.Exception
data
- set of instances serving as training data
java.lang.Exception
- if the rule has not been generated
successfullypublic double classifyInstance(Instance instance) throws java.lang.Exception
if
- a prediction can't be made.
java.lang.Exception
public RuleNode topOfTree()
public java.lang.String toString()
toString
in class java.lang.Object
public void setUnpruned(boolean unpruned)
unpruned
- true if unpruned tree/rules are to be generatedpublic boolean getUnpruned()
public void setUseTree(boolean u)
u
- true if m5 tree is to be usedpublic boolean getUseTree()
public void setSmoothing(boolean s)
s
- true if smoothing is to be usedpublic boolean getSmoothing()
public Instances notCoveredInstances()
public boolean getRegressionTree()
public void setRegressionTree(boolean newregressionTree)
newregressionTree
- Value to assign to regressionTree.public void setMinNumInstances(double minNum)
minNum
- the minimum number of instancespublic double getMinNumInstances()
double
valuepublic RuleNode getM5RootNode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London