Skip to content
Minsing Log
Go back

English Edition

Overfitting with k-fold cross-validation

Data & ML

Since this is an experimental experience, please elaborate if there are any incorrect parts in my opinions.

Motivation

I am working on modeling to estimate missing values.

I am tuning hyperparameters, and in K-fold CV, I increased n_trial to around 1000 and proceeded with tuning in the direction of improving performance on k-fold CV. However, performance on the test set was poor; instead, the model with the default parameters, without hyperparameter tuning, performed better on the test set.

Interpretation

This can be interpreted as meaning that the hyperparameter-optimized model has lower generalizability. Therefore, it can be seen that excessive optimization of performance on k-fold CV may instead reduce the model’s generalizability due to overfitting to the data used for CV.

Conclusion

I realized that early stopping exists for a reason.

Even if test performance is too good, overfitting or data leakage should be suspected.

공개 여정 구독

글이 올라오면 이메일로 보내드릴게요.

개발, 창업, 배움, 실패와 회고를 짧고 솔직하게 기록합니다. 검색으로 스쳐가는 독자가 아니라 여정을 따라오는 팬을 만들기 위한 뉴스레터입니다.

뉴스레터는 준비 중입니다. 그동안 RSS 로 구독하거나 이메일 로 알림을 요청해 주세요.


Share this post:

Comments

Sign in with GitHub to leave a comment.


Previous Post
2024 Memoir
Next Post
What is a class method? How do you access methods of a nested class from a nested class?