If you use the StratifiedKFold object, you can do whatever you'd like with
the splits.

http://scikit-learn.org/stable/modules/generated/sklearn.cross_validation.StratifiedKFold.html

On Tue, Nov 24, 2015 at 12:52 PM, Herbert Schulz <hrbrt....@gmail.com>
wrote:

> Hello,
>
>
>
> i want to compare a classifier from scikit learn with a another method.
>
> So in generall, with the other method, i'll obtain also an array with
>
>  predicted and expected values, but i have no classifier object like:
>
>
>
> clf=GaussianNB()
>
>
> scores = cross_validation.cross_val_score(clf,X,y, cv=10,
> scoring='accuracy')
>
> print("Accuracy: %0.2f (+/- %0.2f) [%s]" % (scores.mean(), scores.std(),
> name))
>
>
>
> I know how to compute the mean, std... and so on..
>
>
> but the cross_val_score uses a stratified CV, so i can not use
>
>
> X_train, X_test, y_train, y_test =  cross_validation.train_test_split(x,
> y, test_size=.1)
>
>
> So i actually just want to use the same "split", produced from
> cross_validation.cross_val_score(clf,X,y, cv=10, scoring='accuracy'), on
> the other method, to get some comparable mean and std values.
>
>
>
>
>
> ------------------------------------------------------------------------------
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple
> OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to