|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.j48.ClassifierDecList | +--weka.classifiers.j48.PruneableDecList
Class for handling a partial tree structure that can be pruned using a pruning set.
Field Summary |
Fields inherited from class weka.classifiers.j48.ClassifierDecList |
indeX, m_isEmpty, m_isLeaf, m_localModel, m_sons, m_test, m_toSelectModel, m_train |
Constructor Summary | |
PruneableDecList(ModelSelection toSelectLocModel,
int minNum)
Constructor for pruneable partial tree structure. |
Method Summary | |
void |
buildRule(Instances train,
Instances test)
Method for building a pruned partial tree. |
int |
chooseIndex()
Method for choosing a subset to expand. |
int |
chooseLastIndex()
Choose last index (ie. choose rule). |
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.j48.ClassifierDecList |
buildDecList, buildDecList, classifyInstance, cleanup, distributionForInstance, getNewDecList, 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 Exception
Exception
- if tree can't be built successfullypublic final int chooseIndex()
chooseIndex
in class ClassifierDecList
public final int chooseLastIndex()
chooseLastIndex
in class ClassifierDecList
protected ClassifierDecList getNewDecList(Instances train, Instances test, boolean leaf) throws Exception
getNewDecList
in class ClassifierDecList
Exception
- if something goes wrongprotected void pruneEnd() throws Exception
pruneEnd
in class ClassifierDecList
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |