Updated error message for max_leaf_nodes
Solves
@@ -244,8 +244,8 @@ class BaseDecisionTree(six.with_metaclass(ABCMeta, BaseEstimator)):
raise ValueError("max_leaf_nodes must be integral number but was "
"%r" % max_leaf_nodes)
if -1 < max_leaf_nodes < 2:
- raise ValueError(("max_leaf_nodes {0} must be either smaller than "
- "0 or larger than 1").format(max_leaf_nodes))
+ raise ValueError(("max_leaf_nodes {0} must be either None "
+ "or larger than 1").format(max_leaf_nodes))
if sample_weight is not None:
if (getattr(sample_weight, "dtype", None) != DOUBLE or
