1
$\begingroup$

Cross validation on a dataset with 22680 observations. Want the training set to contain 21420 entries. How many folds can you use for your cross validation? How do you calculate the folds?

$\endgroup$
1
  • 2
    $\begingroup$ It's unclear what you mean -- you can pick as many folds as there are subsets of the input. Pick from among them randomly. Is there more to it? $\endgroup$
    – Sean Owen
    Oct 8, 2015 at 14:26

1 Answer 1

5
$\begingroup$

The number of folds is nothing you can really calculate. It is more a parameter you choose by good judgement. Typically used values are between 5 and 10, but you can even go up to the so-called leave-one-out cross validation, in which each fold consists of all but one observation. The arguments that guide your decision are typically the following: - computational cost: the more folds you use, the more computations you need. - variance: the more folds you use, the higher the variance of the cross validation result - bias: the more folds you use, the smaller the bias of the cross validation result.

In your case, depending on the exact context in which you want to apply cross validation, you will probably want to choose between 5 and 10 folds.

For more details, you might want to consult Kohavi's 1995 paper on cross validation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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