0
$\begingroup$

how the folds in cross validation of libSVM are done?, I mean, the splits are done aleatory? for example if I have 100 data and it is 4-fold then when it is an aleatory folding then can be splited like this?

  • 20-45 : fold1
  • 45-70 : fold2
  • 70-95 : fold3
  • 95-20 : fold4

or it make the folds always starting from the first one:

  • 1-25 : fold1
  • 25-50 : fold2
  • 50-75 : fold3
  • 75-100 : fold4

so how can I choose which kind on folding I want to use?

Thank you for your answers

$\endgroup$
1
  • 1
    $\begingroup$ Wow, I love the word "aleatory". $\endgroup$ – amoeba Mar 3 '14 at 14:19
1
$\begingroup$

I think you misunderstand the way folds are generated in cross-validation. In cross-validation, your data set is partitioned at random into a specific number of folds.* The data is not partitioned as you would slice a pie (e.g. adjacent instances belonging to the same fold).

*: in stratified cross-validation the class balance in the overall data set is maintained across folds.

$\endgroup$
1
  • 1
    $\begingroup$ While randomly assigning the cases to the folds is usually the best option, there are systematic ways of spitting which are also discussed as "cross validation" see e.g. here wiki.eigenvector.com/index.php?title=Using_Cross-Validation. $\endgroup$ – cbeleites unhappy with SX Mar 3 '14 at 17:38

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.