Hi all,
first of all thanks for all the developers for working on scikit-learn, it
is a wonderful library.
I am struggling for a while now with the following problem:
Trying to use GBR with LR as a BaseEstimator, and I'm getting the following
error:
File "main.py", line 110, in main
score = np.mean(cross_validation.cross_val_score(rd, X, y, cv=4,
scoring='roc_auc'))
File "C:\Python27\lib\site-packages\sklearn\cross_validation.py", line
1152, in cross_val_score
for train, test in cv)
File
"C:\Python27\lib\site-packages\sklearn\externals\joblib\parallel.py", line
517, in __call__
self.dispatch(function, args, kwargs)
File
"C:\Python27\lib\site-packages\sklearn\externals\joblib\parallel.py", line
312, in dispatch
job = ImmediateApply(func, args, kwargs)
File
"C:\Python27\lib\site-packages\sklearn\externals\joblib\parallel.py", line
136, in __init__
self.results = func(*args, **kwargs)
File "C:\Python27\lib\site-packages\sklearn\cross_validation.py", line
1060, in _cross_val_score
estimator.fit(X_train, y_train, **fit_params)
File
"C:\Python27\lib\site-packages\sklearn\ensemble\gradient_boosting.py", line
890, in fit
return super(GradientBoostingClassifier, self).fit(X, y)
File
"C:\Python27\lib\site-packages\sklearn\ensemble\gradient_boosting.py", line
613, in fit
random_state)
File
"C:\Python27\lib\site-packages\sklearn\ensemble\gradient_boosting.py", line
486, in _fit_stage
sample_mask, self.learning_rate, k=k)
File
"C:\Python27\lib\site-packages\sklearn\ensemble\gradient_boosting.py", line
172, in update_terminal_regions
y_pred[:, k])
IndexError: too many indices
I have found a similar problem on stackoverflow (
http://stackoverflow.com/questions/17454139/gradientboostingclassifier-with-a-baseestimator-in-scikit-learn)
and tried to implement the adaptor but it didn't help, the error remained
the same.
Does anyone have any ideas how to resolve this?
Cheers;
Attila
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general