weka.classifiers.trees.j48
Class PruneableClassifierTree
java.lang.Object
|
+--weka.classifiers.trees.j48.ClassifierTree
|
+--weka.classifiers.trees.j48.PruneableClassifierTree
- All Implemented Interfaces:
- Drawable, java.io.Serializable
- public class PruneableClassifierTree
- extends ClassifierTree
Class for handling a tree structure that can
be pruned using a pruning set.
- Version:
- $Revision: 1.8 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
- Serialized Form
Methods inherited from class weka.classifiers.trees.j48.ClassifierTree |
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, graph, graphType, numLeaves, numNodes, prefix, toSource, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PruneableClassifierTree
public PruneableClassifierTree(ModelSelection toSelectLocModel,
boolean pruneTree,
int num,
boolean cleanup,
int seed)
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 modelpruneTree
- true if the tree is to be prunednum
- number of subsets of equal size
- Throws:
java.lang.Exception
- if something goes wrong
buildClassifier
public void buildClassifier(Instances data)
throws java.lang.Exception
- Method for building a pruneable classifier tree.
- Overrides:
buildClassifier
in class ClassifierTree
- Throws:
java.lang.Exception
- if tree can't be built successfully
prune
public void prune()
throws java.lang.Exception
- Prunes a tree.
- Throws:
java.lang.Exception
- if tree can't be pruned successfully
Copyright (c)
2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London