Hello everyone,

I'm trying to execute a grid search with the GridSearchCV class (for an 
AdaBoostClassifier) and want to use a custom sample_weight vector to 
begin with. However, I can't figure out, how to do this. Passing the 
parameter to GridSearchCV's fit()-method gives me the message, that this 
is deprecated and will be ignored. Passing it to the 
GridSearch-constructor like so:

grid = GridSearchCV(clf, params, fit_params={'sample_weights': my_weights})

doesn't work either, because it tries to apply the same weights vector 
to each of the different folds, which of course doesn't make sense and 
fails because the size of my_weights doesn't correspond to the sizes of 
the folds. Can I somehow specify a weights vector for each fold? Is 
there an easier way? Is this even possible?
I'm sorry, if I'm missing something obvious here.... By the way, I'm 
using the latest development version (0.14-git).

Best regards.
Peter


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to