More work on the cost calculation of a DecisionTreeNode.