2
$\begingroup$

1) I was studying about cross-validation and have a bit of confusion here. I understand about the k-fold technique, where if you have 100 data and do 10 folds validation, you use the n=10 data for training and another n=90 for calculating the error (or maybe the other way round?

However, when you do leave on out, you are basically training on n=99 data, and calculating error on the n=1 data? how do this work? because you can't basically fit on one data? Or am I getting something wrong here?

2) Secondly, isn't fitting data with a higher degree of polynomial always yield less error?

$\endgroup$
2
$\begingroup$

You should check again how cross-validation works. But maybe start with a simple train-test split (hold-out estimation). To answer your Questions:

1) It's the other way around. And you do it k=10 times, so that each instance is used to train 9 models and is predicted exactly once.

No, you are training on 99 data and predicting the 1 data point in your validation set.

2) Yes, true for in-sample error. Maybe you are overfitting and your test error is much higher.

$\endgroup$
  • $\begingroup$ in that case does the higher test error = overfitting/underfitting? Is there's a way to check if it's under-fitted or overfitted? $\endgroup$ – Sharah Nov 1 '18 at 12:50
  • $\begingroup$ low training error/high test error = overfitting, yes. You use your validation and test set to detect and "avoid/reduce" overfitting. $\endgroup$ – mlvalidated Nov 1 '18 at 13:32

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.