Finding a corresponding leaf node for each data point in a decision tree