You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@agramfort thanks - I'm aware of the issue - but I was cautious to get rid of it because handling this properly would incur quite a test-time performance degradation for single instance prediction (checking isinstance or some try-except block).
I'll solve this soon.
if (not hasattr(self.init, 'fit') or not hasattr(self.init, 'predict'))
to check on predict_proba for classification.
Then we need to make sure that if an init estimator has predict_proba we use the log-odds for binary classification and the output of predict_proba for multi-class.
Basically, the following lines have to be changed to accommodate this:
y_pred = self.init_.predict(X) # in fit
and:
score = self.init_.predict(X).astype(np.float64) # in _init_decision_function
I think we need a better implementation of astype somewhere under sklearn/utils. The current implementation of numpy.astype always makes a copy of the data even when it already has the right type.
I think we need a better implementation of astype somewhere under sklearn/
utils. The current implementation of numpy.astype always makes a copy of the
data even when it already has the right type.
Traceback (most recent call last):
File "x.py", line 15, in <module>
clf.fit(X_train, y_train)
File "/home/kaushik/scikit-learn/sklearn/ensemble/gradient_boosting.py", line 1124, in fit
return super(GradientBoostingClassifier, self).fit(X, y, monitor)
File "/home/kaushik/scikit-learn/sklearn/ensemble/gradient_boosting.py", line 782, in fit
begin_at_stage, monitor)
File "/home/kaushik/scikit-learn/sklearn/ensemble/gradient_boosting.py", line 833, in _fit_stages
criterion, splitter, random_state)
File "/home/kaushik/scikit-learn/sklearn/ensemble/gradient_boosting.py", line 575, in _fit_stage
sample_mask, self.learning_rate, k=k)
File "/home/kaushik/scikit-learn/sklearn/ensemble/gradient_boosting.py", line 194, in update_terminal_regions
y_pred[:, k])
IndexError: too many indices
On Thu, Feb 27, 2014 at 12:50 PM, Alexandre Gramfort < [email protected]> wrote:
yes it's the bug I observed. See my gist above
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/2691#issuecomment-36234269
.
@abhishekkrthakur Did you ever find a workaround for this? I saw that a solution here existed but I was wondering if you had come across anything else.
Activity
pprett commentedon Dec 26, 2013
@agramfort thanks - I'm aware of the issue - but I was cautious to get rid of it because handling this properly would incur quite a test-time performance degradation for single instance prediction (checking isinstance or some try-except block).
I'll solve this soon.
agramfort commentedon Dec 26, 2013
ok thanks.
amueller commentedon Dec 27, 2013
Hm I guess we should fix that before a release, right?
pprett commentedon Dec 27, 2013
jep - lets put a milestone
agramfort commentedon Jan 8, 2014
now that the big refactoring of GBRT is merged, what's needed here?
pprett commentedon Jan 9, 2014
basically consolidating this check:
to check on
predict_probafor classification.Then we need to make sure that if an
initestimator haspredict_probawe use the log-odds for binary classification and the output ofpredict_probafor multi-class.Basically, the following lines have to be changed to accommodate this:
and:
ogrisel commentedon Jan 9, 2014
I think we need a better implementation of
astypesomewhere undersklearn/utils. The current implementation ofnumpy.astypealways makes a copy of the data even when it already has the right type.GaelVaroquaux commentedon Jan 9, 2014
check_arrays will do it, I believe.
kaushik94 commentedon Feb 27, 2014
Is this the bug:
pprett commentedon Feb 27, 2014
@kaushik94 more context please - arguments and dataset characteristics in particular
agramfort commentedon Feb 27, 2014
yes it's the bug I observed. See my gist above
abhishekkrthakur commentedon May 1, 2014
Is there any workaround available for this?
On Thu, Feb 27, 2014 at 12:50 PM, Alexandre Gramfort <
[email protected]> wrote:
Regards
Abhishek Thakur
minnich49 commentedon Feb 24, 2018
@abhishekkrthakur Did you ever find a workaround for this? I saw that a solution here existed but I was wondering if you had come across anything else.
jeremiedbb commentedon Mar 2, 2020
Fixed by #12983. Closing.