public ErrorBasedPruning(DecisionTree tree, double[][] inputs, int[] outputs)
{
this.tree = tree;
this.inputs = inputs;
this.outputs = outputs;
this.subsets = new Dictionary<DecisionNode, List<int>>();
this.actual = new int[outputs.Length];
// Create the cache to store how many times a sample
// passes through each decision node of the tree.
//
foreach (var node in tree)
subsets[node] = new List<int>();
// Compute the entire pruning set and track the path
// taken by each observation during the reasoning.
//
for (int i = 0; i < inputs.Length; i++)
trackDecisions(tree.Root, inputs[i], i);
}