weka.classifiers.rules.part
Class C45PruneableDecList

java.lang.Object
  extended byweka.classifiers.rules.part.ClassifierDecList
      extended byweka.classifiers.rules.part.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.

Version:
$Revision: 1.6 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
Serialized Form

Field Summary
private  double CF
          CF
 
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
C45PruneableDecList(ModelSelection toSelectLocModel, double cf, int minNum)
          Constructor for pruneable tree structure.
 
Method Summary
 void buildDecList(Instances data, boolean leaf)
          Builds the partial tree without hold out set.
 double getEstimatedErrorsForLeaf()
          Computes estimated errors for leaf.
private  double getEstimatedErrorsForTree()
          Computes estimated errors for tree.
protected  ClassifierDecList getNewDecList(Instances data, 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
buildRule, chooseIndex, chooseLastIndex, classifyInstance, cleanup, distributionForInstance, getSizeOfBranch, localModel, son, toString, weight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CF

private double CF
CF

Constructor Detail

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 model
cf - the confidence factor for pruning
minNum - the minimum number of objects in a leaf
Throws:
java.lang.Exception - if something goes wrong
Method Detail

buildDecList

public void buildDecList(Instances data,
                         boolean leaf)
                  throws java.lang.Exception
Builds the partial tree without hold out set.

Overrides:
buildDecList in class ClassifierDecList
Throws:
java.lang.Exception - if something goes wrong

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.


getEstimatedErrorsForTree

private double getEstimatedErrorsForTree()
Computes estimated errors for tree.


getEstimatedErrorsForLeaf

public double getEstimatedErrorsForLeaf()
Computes estimated errors for leaf.