[scikit-learn] Decision trees with only pure leaves

Pranav Ashok pranavashok at gmail.com
Wed Aug 8 05:41:27 EDT 2018


I am trying to use scikit-learn for building decision trees representing
fully defined many-to-one functions. i.e. f(x1, x2, ..., xn) = f(x1', x2',
..., xn') if and only if x1 = x1', x2 = x2' and so on. In such a scenario,
it seems clear that it is possible to construct trees which have pure
leaves as long as min_samples_split = 2 and I am not setting any other
parameters which might stop the splitting. My question is whether the
decision tree builder in scikit-learn can indeed give me a perfect
representation, i.e where all leaf nodes are pure. This would imply that
tree.predict(x) = f(x).

Thanks and best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20180808/9f215722/attachment.html>


More information about the scikit-learn mailing list