private double computeErrorWithoutSubtree(DecisionNode tree, int mostCommon)
{
var branches = tree.Branches;
var output = tree.Output;
tree.Branches = null;
tree.Output = mostCommon;
double error = computeError();
tree.Branches = branches;
tree.Output = output;
return error;
}