[scikit-learn] Bugs in Tree.py

Nelson Liu nfliu at uw.edu
Tue Nov 29 13:44:52 EST 2016


Hi,
I think this is working as the docs say; 1 is an integer and is thus
treated as a raw number of samples. If you wanted a percentage value of
100%, you'd have to pass in the float 1.0. I recall a related issue being
raised here: https://github.com/scikit-learn/scikit-learn/issues/7603

Also, I don't see how lines 195-199 in tree.py would issue a value
error...could you recheck the line numbers?

Nelson Liu

On Tue, Nov 29, 2016 at 7:15 AM ALVARENGA GAMERO ALFONSO ABRAHAM <
alfonso82 at kaist.ac.kr> wrote:

> sklearn/tree/tree.py
>
>
>
> With the new 0.18 version, it is possible to add percentages values for
> "min_samples_split"
>
>
>
> #.. versionchanged:: 0.18
>
> #Added float values for percentages.
>
>
>
> How ever, a value of 1 will make the program to issue an ValueError (lines
> 195-199), since 1 is an Integer and does not hold the condition of being
> bigge ror equal than 2. It is quite easy to solve by hand (if not 2 <=
> self.min_samples_split and self.min_samples_split != 1: in line 196), but
> I'm pretty sure there has to be a clever way to solve it. I might go back
> to that later, as there might be more bugs as this one with the new options
> in version 0.18.
>
>
>
> Thank you!
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20161129/b2029990/attachment.html>


More information about the scikit-learn mailing list