|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.rules.part.ClassifierDecList
weka.classifiers.rules.part.PruneableDecList
Class for handling a partial tree structure that can be pruned using a pruning set.
Field Summary |
Fields inherited from class weka.classifiers.rules.part.ClassifierDecList |
indeX, m_isEmpty, m_isLeaf, m_localModel, m_minNumObj, m_sons, m_splitCrit, m_test, m_toSelectModel, m_train |
Constructor Summary | |
PruneableDecList(ModelSelection toSelectLocModel,
int minNum)
Constructor for pruneable partial tree structure. |
Method Summary | |
void |
buildDecList(Instances train,
Instances test,
boolean leaf)
Builds the partial tree with hold out set |
void |
buildRule(Instances train,
Instances test)
Method for building a pruned partial tree. |
private double |
errorsForLeaf()
Computes estimated errors for leaf. |
private double |
errorsForTree()
Computes error estimate for tree. |
protected ClassifierDecList |
getNewDecList(Instances train,
Instances test,
boolean leaf)
Returns a newly created tree. |
protected void |
pruneEnd()
Prunes the end of the rule. |
Methods inherited from class weka.classifiers.rules.part.ClassifierDecList |
buildDecList, buildRule, chooseIndex, chooseLastIndex, classifyInstance, cleanup, distributionForInstance, getNewDecList, getSizeOfBranch, localModel, son, toString, weight |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PruneableDecList(ModelSelection toSelectLocModel, int minNum)
toSelectLocModel
- selection method for local splitting modelminNum
- minimum number of objects in leafMethod Detail |
public void buildRule(Instances train, Instances test) throws java.lang.Exception
java.lang.Exception
- if tree can't be built successfullypublic void buildDecList(Instances train, Instances test, boolean leaf) throws java.lang.Exception
java.lang.Exception
- if something goes wrongprotected ClassifierDecList getNewDecList(Instances train, Instances test, boolean leaf) throws java.lang.Exception
java.lang.Exception
- if something goes wrongprotected void pruneEnd() throws java.lang.Exception
java.lang.Exception
private double errorsForTree() throws java.lang.Exception
java.lang.Exception
private double errorsForLeaf() throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |