K-Fold Cross Validation Explained

Using SciKit-Learn and Yellowbrick libraries

Carla Martins
Towards AI
Published in
5 min readApr 25, 2022

--

The overfitting problem

One of the biggest problems in Machine Learning is the risk of Overfitting. But what is Overfitting?

Overfitting occurs when the results of our model (accuracy) are very good in the training data, but then the model fails to obtain the same results in the test or validation data.

In the image above we can see that the score in the training set was 85%, but in the test set, it was only…

--

--

Compulsive learner. Passionate about technology. Speaks C, R, Python, SQL, Haskell, Java and LaTeX. Interested in creating solutions.