0
$\begingroup$

Starting from Linear Regression, we always divide our dataset into training and test. Once we come to cross validation, this is now training and validation sets. In validation approach, we divide either equally or say into two parts. In Leave one out cross validation (LOOCV) we split the dataset by 1 : n-1, in K-fold we divide the dataset into almost equal k parts.

So, cross validation is just varying the way we divide the datasets?

$\endgroup$
3
$\begingroup$

I'm really not sure I understand your question. To answer what you seem to be asking, no, cross-validation isn't just a matter of dividing a dataset into parts (folds). That's only the first step. The second step is to, for each fold, treat that fold as the test set, training the model on the rest of the dataset. Once the cross-validation procedure is through, every data point has been treated as (a) part of the test set one time, and (b) part of the training set k - 1 times where k is the number of folds. Compare this to the method of setting aside a test set, which causes every data point to be used once in the training set or once in the test set but not both. It's also possible to combine these methods, which is useful if you want to make modeling decisions on the basis of cross-validation before getting a final estimate of test error using the held-out test set.

$\endgroup$

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.