In this recipe, we used the validation_curve function of the scikit-learn library to plot the learning curve. This function determines cross-validated training and testing scores for different training set sizes.