GradientBoostingClassifier with a BaseEstimator #2130

Closed
iampat opened this Issue Jul 4, 2013 · 4 comments

Comments

Projects
None yet
3 participants

iampat commented Jul 4, 2013

GradientBoostingClassifier does not work correctly, when the BasePredictor (init) is set to something like linear_model.LogisticRegression().

I thinks the source of the error is in in BaseGradientBoosting.fit() where
# init predictions
y_pred = self.init_.predict(X)

y_pred should be initialized by class probabilities and not with the winner class.

Replacing y_pred = self.init_.predict(X) with y_pred = self.init_.predict_proba(X) can solve the problem.

pprett was assigned Jul 4, 2013

Owner

pprett commented Jul 4, 2013

thanks for reporting @iampat - will look into it

amueller added this to the 0.15.1 milestone Jul 18, 2014

Owner

amueller commented Jul 18, 2014

I can confirm the bug. It is also not clear to me from the documentation whether a classifier or regressor should be fed as "init".

Owner

pprett commented Jul 18, 2014

Hi guys,

I know -- my bad -- I was aware of this but any check I did (isinstance,
hasattr) was too costly at prediction time. Still needs to be fixed - I
will look into it in the coming days.

2014-07-18 17:15 GMT+02:00 Andreas Mueller notifications@github.com:

I can confirm the bug. It is also not clear to me from the documentation
whether a classifier or regressor should be fed as "init".


Reply to this email directly or view it on GitHub
#2130 (comment)
.

Peter Prettenhofer

Owner

amueller commented Jul 18, 2014

I'll close this as a duplicate of #2691

amueller closed this Jul 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment