2013/12/5 abdalrahman eweiwi <abdalrahman.ewe...@gmail.com>:
> Hi,
>
> I have a problem of getting GridSearchCV working with kpls for fine tunning
> its parameters. I have reviewed the documentation for how to get a new
> estimator work with GridSearchCV but I did not find enough information
> there. I pursued myself on this but finally I got stuck with a problem
> related to multi-class labels and the cross validation. As cross-validation
> randomly subsample from all the data, it may take distinct number of classes
> at each iteration, but I need the sampler to get random samples for each
> class so that all classes are represented at each iteration. Is there a way
> to go around this problem?

You should not have the problem if you use StratifiedKFold (the
default for classification) or StratifiedShuffleSplit.


-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to