I've answered my own question.

The solution is to use a Pipeline that is passed to the cross_val_score instead 
of the estimator

--------------------------------
Matti Lyra
DPhil Student

Text Analytics Group
Chichester 1, R203 
School of Engineering and Informatics
University of Sussex
Brighton, UK
[email protected]
Tel: +441273 872956



On 9 Nov 2012, at 15:30, Matti Lyra wrote:

> I was looking at the cross validation code for scikits 
> (sklearn.crossvalidation.cross_val_score) and noticed that there doesn't seem 
> to a way of doing feature selection within a cross validation loop.
> 
> Is this indeed the case, or am I missing something?
> 
> --------------------------------
> Matti Lyra
> DPhil Student
> 
> Text Analytics Group
> Chichester 1, R203 
> School of Engineering and Informatics
> University of Sussex
> Brighton, UK
> [email protected]
> Tel: +441273 872956
> 
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov_______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to