# Validation Curve Interpretation

I have been reading about the validation_curve function from scikit learn. When I run this it takes too long. Therefore, I am plotting the results from grid search instead, which seems to be far quicker. However, when I plot using the code from: https://matthewbilyeu.com/blog/2019-02-05/validation-curve-plot-from-gridsearchcv-results.

I get:

Why are the lines so close together? Shouldn't I get a curve instead? More generally, how can I tell if my model is under-fitting or overfitting? How can I plot the overfit/under-fit areas on my plot.

edit: i am trying to predict if a client will default on a loan or not so 1 for yes 0 for no. the data are financials. also the data i have used is about 100k samples

• At first glance it looks like you are using a small dataset that is easy to model. Regardless of the hyperparameters you choose, xgboost easily finds an optimal solution. Cross validated performance is a little lower as you have a few tricky examples that don’t fit the pattern described by the rest of the dataset, and when these are in the hold-out set in cross validation the model performs worse. Could you please describe your dataset and tell us what you are trying to predict? – Nicholas James Bailey Jun 18 '20 at 20:49
• thanks i have updated it – Maths12 Jun 19 '20 at 7:36