1
$\begingroup$

What is the difference between leave one subject out cv and leave one out cross validation (loocv)? are they same or different?. I have images of 24 subject and according to literature, leave one subject out is best cross validation for pain expression detection because of its subjective nature. is there any function for leave one subject out cv in sklearn like loocv? or I have to manually hold out one subjects images (one subject out of 23) and train for rest 23 subjects? is it right approach ?

$\endgroup$
1
$\begingroup$

Leave one out subject makes it sure that you don't have subject bias.

The fact that you have the same subject in your training and your testing datasets will make the model know more about your subject than it should. With a brand new subject, the model will probably perform poorly because it never trained on the subject before.

There is no such tool available in sklearn, as it's very easy to build your own if the subject id is a column in your dataset.

$\endgroup$
2
  • $\begingroup$ I'm not a sklearn user, but if its definition of "leave out" doesn't entail leaving it "out" of the training set, then I'm unpleasantly surprised. $\endgroup$
    – DHW
    Nov 1 '19 at 20:06
  • $\begingroup$ When sklearn splits the dataset, of course the test dataset is not in the training dataset. It's just that there is no leave ONE out, there are of course ways of doing cross validation, as this is more complex that LOO which is less than a one liner. $\endgroup$ Nov 3 '19 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.