Hi Peter. What you try to achieve is currently not possible afaik There was a branch by Noel to implement this but I'm not sure about it's state. You could give it a shot. Alternatively you can use the IterGrid (or ParameterGrid in the dev version I think) from the grid_search module and write the for-loop yourself. That shouldn't be too hard.
Hth, Andy On 05/31/2013 04:25 PM, Peter Retzlaff wrote: > 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 ------------------------------------------------------------------------------ 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