Re: [Scikit-learn-general] Subject Independent KFold

2015-03-24 Thread Jean K
Andreas Muller suggested GroupIndependentKFold. The problem with adding a parameter (such as stratified) to the existing LeaveKLabelOut is that it might be misleading in the sense that: (i) here we might we don't care about the number of labels left out (ii) The number of labels left out might var

Re: [Scikit-learn-general] Subject Independent KFold

2015-03-24 Thread Jean K
Hi, Yes Michael, that's exactly what I want. Basically I don't care about the number of Labels left out, I just want K (approximately) equilibrated folds, where the same label does not appear in both training and testing (therefore the number of labels left out might vary for each fold). Indeed

Re: [Scikit-learn-general] Subject Independent KFold

2015-03-24 Thread Michael Eickenberg
looks like the difference is that it can group several labels into one fold. not everybody works with "subjects" - the proper name would contain the word Label or Group, or it should be incorporated in a LeaveLabelsOut which could have several modes, among which LeaveOneLabelOut and "balanced" mod

Re: [Scikit-learn-general] Subject Independent KFold

2015-03-24 Thread Gael Varoquaux
On Tue, Mar 24, 2015 at 04:58:20PM +0100, Alexandre Gramfort wrote: > how different is it from > http://scikit-learn.org/stable/modules/generated/sklearn.cross_validation.LeaveOneLabelOut.html > ? Well, LeaveOneLabelOut should be modified to be able not to do an exhaustive set (which scales pretty

Re: [Scikit-learn-general] Subject Independent KFold

2015-03-24 Thread Jean K
Hi Alexandre, My problem was that each sample was obtained from a specific subject (a same subject possibly produced several samples) and I wanted to train and test on different subjects. As I understand it, LeaveOneLabelOut (and more generally LeavePLabelOut) can be used to leaves one subject (o

Re: [Scikit-learn-general] Subject Independent KFold

2015-03-24 Thread Alexandre Gramfort
hi jean, how different is it from http://scikit-learn.org/stable/modules/generated/sklearn.cross_validation.LeaveOneLabelOut.html ? A On Tue, Mar 24, 2015 at 4:49 PM, Jean K wrote: > Hi all, > > I recently needed to perform some subject independent KFold > cross-validation. To my knowledge this

[Scikit-learn-general] Subject Independent KFold

2015-03-24 Thread Jean K
Hi all, I recently needed to perform some subject independent KFold cross-validation. To my knowledge this feature isn't in the scikit-learn yet, so I created a pull-request with a simple implementation. It is similar the original Fold exce