C# Class Accord.MachineLearning.DecisionTrees.Pruning.ErrorBasedPruning

Error-based pruning.

References: Lior Rokach, Oded Maimon. The Data Mining and Knowledge Discovery Handbook, Chapter 9, Decision Trees. Springer, 2nd ed. 2010, XX, 1285 p. 40 illus. Available at: http://www.ise.bgu.ac.il/faculty/liorr/hbchap9.pdf .

Mostra file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
ErrorBasedPruning ( DecisionTree tree, double inputs, int outputs ) : System

Initializes a new instance of the ErrorBasedPruning class.

Run ( ) : double

Computes one pass of the pruning algorithm.

Private Methods

Method Description
compute ( DecisionNode node ) : bool

Attempts to prune a node's subtrees.

computeError ( ) : double
computeErrorReplacingSubtrees ( DecisionNode tree, DecisionNode child ) : double
computeErrorWithoutSubtree ( DecisionNode tree, int mostCommon ) : double
getMaxChild ( DecisionNode tree ) : DecisionNode
trackDecisions ( DecisionNode root, double input, int index ) : void
upperBound ( double error, int size ) : double

Method Details

ErrorBasedPruning() public method

Initializes a new instance of the ErrorBasedPruning class.
public ErrorBasedPruning ( DecisionTree tree, double inputs, int outputs ) : System
tree DecisionTree The tree to be pruned.
inputs double The pruning set inputs.
outputs int The pruning set outputs.
return System

Run() public method

Computes one pass of the pruning algorithm.
public Run ( ) : double
return double