Hello Antonio,

Sure:
import sklearn
print(sklearn.__version__)
0.18.1

The error suggests that the fit function is expecting a split vector with size 2/3*1000 but the whole vector (size 1000) is passed.

...
ValueError: Found a sample_weight array with shape (1000,) for an input with shape (666, 1). sample_weight cannot be broadcast.



El 22 jun. 2017 11:49 p. m., "Julio Antonio Soto de Vicente" <julio@esbet.es> escribió:
Hi Manuel,

Are you sure that you are using the latest version (or at least >0.17)? The code for splitting the sample weights in GridSearchCV has been there for a while now...

--
Julio

El 22 jun 2017, a las 23:33, Manuel Castejón Limas <manuel.castejon@gmail.com> escribió:

Dear all,
I posted the full question on StackOverflow and as it contains some figures I refer you to that post. 


I currently  believe that this issue is a bug and I opened an issue on GitHub.

To sum up, the issue is that GridSearchCV does not handle the splitting of the sample_weight vector during cross validation.

Nota bene: cross_val_score seems to handle the splitting OK, this issue seems to occurr only in GridSearchCV.

Any comments enlightening me and showing me how wrong I am are most welcome.




_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn