weka.classifiers.j48
Class C45PruneableDecList
java.lang.Object
|
+--weka.classifiers.j48.ClassifierDecList
|
+--weka.classifiers.j48.C45PruneableDecList
- All Implemented Interfaces:
- java.io.Serializable
- public class C45PruneableDecList
- extends ClassifierDecList
Class for handling a partial tree structure pruned using C4.5's
pruning heuristic.
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
C45PruneableDecList
public C45PruneableDecList(ModelSelection toSelectLocModel,
double cf,
int minNum)
throws java.lang.Exception
- Constructor for pruneable tree structure. Stores reference
to associated training data at each node.
- Parameters:
toSelectLocModel
- selection method for local splitting modelcf
- the confidence factor for pruningminNum
- the minimum number of objects in a leaf- Throws:
java.lang.Exception
- if something goes wrong
buildRule
public void buildRule(Instances data)
throws java.lang.Exception
- Method for building a pruned partial tree.
- Throws:
java.lang.Exception
- if something goes wrong
chooseIndex
public final int chooseIndex()
- Method for choosing a subset to expand.
- Overrides:
chooseIndex
in class ClassifierDecList
chooseLastIndex
public final int chooseLastIndex()
- Choose last index (ie. choose rule).
- Overrides:
chooseLastIndex
in class ClassifierDecList
getNewDecList
protected ClassifierDecList getNewDecList(Instances data,
boolean leaf)
throws java.lang.Exception
- Returns a newly created tree.
- Overrides:
getNewDecList
in class ClassifierDecList
- Throws:
java.lang.Exception
- if something goes wrong
pruneEnd
protected void pruneEnd()
- Prunes the end of the rule.
- Overrides:
pruneEnd
in class ClassifierDecList
getEstimatedErrorsForLeaf
public double getEstimatedErrorsForLeaf()
- Computes estimated errors for leaf.