private double predictUsingCurtailment(Example example, ExtendedTree node) { double dPrediction = 0; if (node.isLeaf()) { dPrediction = predictAsLeaf(example, node); } else { boolean bEdgeConditionFound = false; Iterator<Edge> childIterator = node.childIterator(); while ((childIterator.hasNext()) && (bEdgeConditionFound == false)) { Edge edge = childIterator.next(); SplitCondition condition = edge.getCondition(); if (condition.test(example)) { bEdgeConditionFound = true; ExtendedTree childTree = (ExtendedTree) edge.getChild(); if (childTree.getTotalExamples() >= dCurtailmentThreshold) dPrediction = (predictUsingCurtailment(example, childTree)); else dPrediction = predictAsLeaf(example, node); } } if (bEdgeConditionFound == false) { dPrediction = predictAsLeaf(example, node); } } return dPrediction; }