public class TreePruner extends Object
TreeNodeVisitor
. Pruning is done with a held out testing
set
Modifier and Type | Class and Description |
---|---|
static class |
TreePruner.PruningMethod
The method of pruning to use
|
Modifier and Type | Method and Description |
---|---|
static void |
prune(TreeNodeVisitor root,
TreePruner.PruningMethod method,
ClassificationDataSet testSet)
Performs pruning starting from the root node of a tree
|
static void |
prune(TreeNodeVisitor root,
TreePruner.PruningMethod method,
List<DataPointPair<Integer>> testSet)
Performs pruning starting from the root node of a tree
|
public static void prune(TreeNodeVisitor root, TreePruner.PruningMethod method, ClassificationDataSet testSet)
root
- the root node of a decision treemethod
- the pruning method to usetestSet
- the test set of data points to use for pruningpublic static void prune(TreeNodeVisitor root, TreePruner.PruningMethod method, List<DataPointPair<Integer>> testSet)
root
- the root node of a decision treemethod
- the pruning method to usetestSet
- the test set of data points to use for pruningCopyright © 2017. All rights reserved.