-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
min_impurity_split parameter of GradientBoostingRegressor is not used #9514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @CyrilLeMat, you're totally right about how For example, from sklearn.ensemble import GradientBoostingRegressor
clf = GradientBoostingRegressor(min_impurity_split=-0.1) Doesn't raise an error, but from sklearn.ensemble import GradientBoostingRegressor
clf = GradientBoostingRegressor(min_impurity_split=-0.1)
# Make up some training data
X = [[1, 2, 3], [4, 5, 6]]
y = [0, 1]
# Fit classifier
clf.fit(X, y) raises |
Hi, GradientBoostingRegressor(alpha=0.9, criterion='friedman_mse', init=None,
learning_rate=0.1, loss='ls', max_depth=3, max_features=None,
max_leaf_nodes=None, min_impurity_split=-0.1,
min_samples_leaf=1, min_samples_split=2,
min_weight_fraction_leaf=0.0, n_estimators=100,
presort='auto', random_state=None, subsample=1.0, verbose=0,
warm_start=False) |
do you then call fit?
…On 10 Aug 2017 5:51 pm, "CyrilLeMat" ***@***.***> wrote:
Hi,
thanks for your answer,
However your exact code don't raise any error on my side.
it prints:
'''python
GradientBoostingRegressor(alpha=0.9, criterion='friedman_mse', init=None,
learning_rate=0.1, loss='ls', max_depth=3, max_features=None,
max_leaf_nodes=None, min_impurity_split=-0.1,
min_samples_leaf=1, min_samples_split=2,
min_weight_fraction_leaf=0.0, n_estimators=100,
presort='auto', random_state=None, subsample=1.0, verbose=0,
warm_start=False)
'''
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9514 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz6357C1NwqkJJTQ2iOfT2FtbF0BVKks5sWraSgaJpZM4OyUt9>
.
|
Hi! yes I did, I found the problem on my package : When the DecisionTreeRegressor are created, there is no parameter 'min_impurity_split =self. min_impurity_split' something new with the 0.18.2? (edit : sorry it's min_impurity_split, not min_samples_split) |
we can see here that the min_impurity_split is not used. however it seems to be back on the 0.19: |
Good catch, I should have specified that I'm using |
@CyrilLeMat but if there is no parameter of that name, you get an error, right? |
I just tried from sklearn.ensemble import GradientBoostingRegressor
clf = GradientBoostingRegressor(min_impurity_split=-0.1)
# Make up some training data
X = [[1, 2, 3], [4, 5, 6]]
y = [0, 1]
# Fit classifier
clf.fit(X, y) with v0.18.2 and it doesn't throw an error. There is a |
Is it passed correctly in v0.19? Looks like it is, to me.
…On 12 August 2017 at 09:29, James Bourbeau ***@***.***> wrote:
I just tried
from sklearn.ensemble import GradientBoostingRegressor
clf = GradientBoostingRegressor(min_impurity_split=-0.1)# Make up some training data
X = [[1, 2, 3], [4, 5, 6]]
y = [0, 1]# Fit classifier
clf.fit(X, y)
with v0.18.2 and it doesn't throw an error. There is a min_impurity_split
parameter for GradientBoostingRegressor in this version. However, during
fitting, the min_impurity_split value from GradientBoostingRegressor is
not passed to the DecisionTreeRegressor that is induced on the residuals
(where the validation of min_impurity_split occurs). So the default value
for min_impurity_split (1e-7) is used instead.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9514 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz66BxL0GW-ayIQsSXcubYNUBo3qUzks5sXOPegaJpZM4OyUt9>
.
|
Yeah, it's passed correctly in v0.19 |
Description
min_impurity_split parameter of GradientBoostingRegressor is not used
Steps/Code to Reproduce
Example:
Expected Results
This example should raise an error
Actual Results
No errors
Versions
Darwin-16.5.0-x86_64-i386-64bit
Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
NumPy 1.13.1
SciPy 0.19.0
Scikit-Learn 0.18.2
The text was updated successfully, but these errors were encountered: