<div style="white-space:pre-wrap">Hi,<br>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: <a href="https://github.com/scikit-learn/scikit-learn/issues/7603">https://github.com/scikit-learn/scikit-learn/issues/7603</a><br><br>Also, I don't see how lines 195-199 in tree.py would issue a value error...could you recheck the line numbers?<br><br>Nelson Liu </div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 29, 2016 at 7:15 AM ALVARENGA GAMERO  ALFONSO ABRAHAM <<a href="mailto:alfonso82@kaist.ac.kr">alfonso82@kaist.ac.kr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p style="font-family:돋움;font-size:14.6667px;line-height:17.6px;margin-top:0px;margin-bottom:0px" class="gmail_msg">sklearn/tree/tree.py</p><p style="font-family:돋움;font-size:14.6667px;line-height:17.6px;margin-top:0px;margin-bottom:0px" class="gmail_msg"> </p><p style="font-family:돋움;font-size:14.6667px;line-height:17.6px;margin-top:0px;margin-bottom:0px" class="gmail_msg">With the new 0.18 version, it is possible to add percentages values for "min_samples_split"</p><p style="font-family:돋움;font-size:14.6667px;line-height:17.6px;margin-top:0px;margin-bottom:0px" class="gmail_msg"> </p><p style="font-family:돋움;font-size:14.6667px;line-height:17.6px;margin-top:0px;margin-bottom:0px" class="gmail_msg"><span style="font-size:11pt;font-family:돋움;line-height:17.6px;margin-top:0px;margin-bottom:0px" class="gmail_msg">#.. versionchanged:: 0.18</span></p><p style="margin:0px;font-family:돋움;font-size:14.6667px;line-height:17.6px" class="gmail_msg">#Added float values for percentages.</p><p style="margin:0px;font-family:돋움;font-size:14.6667px;line-height:17.6px" class="gmail_msg"> </p><p style="margin:0px;font-family:돋움;font-size:14.6667px;line-height:17.6px" class="gmail_msg">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.</p><p style="margin:0px;font-family:돋움;font-size:14.6667px;line-height:17.6px" class="gmail_msg"> </p><p style="margin:0px;font-family:돋움;font-size:14.6667px;line-height:17.6px" class="gmail_msg">Thank you!</p>

<img id="m_-497457443882827709mailexp" width="0" border="0" src="https://mail.kaist.ac.kr/Mail?act=RECEIPT_CHECK&ukey=583d9cff3feae64b817de1a6&userid=alfonso82&mhost=kaist.ac.kr&ahost=d0001" class="gmail_msg">_______________________________________________<br class="gmail_msg">
scikit-learn mailing list<br class="gmail_msg">
<a href="mailto:scikit-learn@python.org" class="gmail_msg" target="_blank">scikit-learn@python.org</a><br class="gmail_msg">
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" class="gmail_msg" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br class="gmail_msg">
</blockquote></div>