Learning Curve and Validation Curve in Python: Diagnose Overfitting and Underfitting
Use scikit-learn's LearningCurveDisplay and ValidationCurveDisplay to tell whether a model is overfitting, underfitting, or needs more data, and to pick a hyperparameter such as max_depth.