jsat.classifiers.trees
Class TreePruner
- java.lang.Object
-
- jsat.classifiers.trees.TreePruner
-
public class TreePruner extends java.lang.ObjectProvides post-pruning algorithms for any decision tree that can be altered using theTreeNodeVisitor. Pruning is done with a held out testing set
All pruning methods handle missing values
NOTE: API still under work, expect changes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classTreePruner.PruningMethodThe method of pruning to use
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidprune(TreeNodeVisitor root, TreePruner.PruningMethod method, ClassificationDataSet testSet)Performs pruning starting from the root node of a treestatic voidprune(TreeNodeVisitor root, TreePruner.PruningMethod method, java.util.List<DataPointPair<java.lang.Integer>> testSet)Performs pruning starting from the root node of a tree
-
-
-
Method Detail
-
prune
public static void prune(TreeNodeVisitor root, TreePruner.PruningMethod method, ClassificationDataSet testSet)
Performs pruning starting from the root node of a tree- Parameters:
root- the root node of a decision treemethod- the pruning method to usetestSet- the test set of data points to use for pruning
-
prune
public static void prune(TreeNodeVisitor root, TreePruner.PruningMethod method, java.util.List<DataPointPair<java.lang.Integer>> testSet)
Performs pruning starting from the root node of a tree- Parameters:
root- the root node of a decision treemethod- the pruning method to usetestSet- the test set of data points to use for pruning
-
-
DataMelt 3.0 © DataMelt by jWork.ORG