What is nested cross-validation?

Nested vs Non-nested Cross-Validation in Machine Learning

As we know Cross-Validation can be used for model error estimation as well as model hyperparameter optimization.

If we are doing either model’s error estimation or the model’s hyperparameter optimization then we can use non-nested simple k-fold cross-validation.
However, if cross-validation is used simultaneously for the model’s error estimation AND the model’s hyperparameter optimization, nested cross-validation is required.

This is because, if the same cross-validation procedure is used for the model’s error estimation AND the model’s hyperparameter optimization, the model’s error estimation may be biased.

One way to fix this bias is to nest the hyperparameter optimization Cross-Validation procedure under the model selection Cross-Validation procedure.
This is called nested Cross-Validation.
Please watch the video Nested vs Non-nested Cross-Validation in Machine Learning for a more detailed explanation.

Nested vs Non-nested Cross-Validation in Machine Learning

--

--

--

Data Scientist & Machine Learning Evangelist. I like to mess with data. dhiraj10099@gmail.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Three examples of data empowerment

Building Competitive Yet Profitable Pricing For Waste Collection

Linear Regression — Detailed View

Shake it up! Network Analytics of Cocktail Ingredients

Big Data — What it is and Why it matters most in today’s era??

Life Expectancy and GDP

How to Get Started Analyzing COVID-19 Data

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dhiraj K

Dhiraj K

Data Scientist & Machine Learning Evangelist. I like to mess with data. dhiraj10099@gmail.com

More from Medium

K Means… what does it mean?

A dust colors. red color, yellow color, green color, blue color, purple color

Learning machine learning for Senior Management — You Just Have to Jump in Systematically

3 Tips to Prevent Your Project from Ending Up in the Data Science Graveyard

Credit Card Fraudulent Transaction Predictions