but vary the amount of training data available for figure - we subsampled the boston housing dataset and evaluated linearregression and ridge(alpha= on subsets of increasing size (plots that show model performance as function of dataset size are called learning curves)in[ ]mglearn plots plot_ridge_n_samples(figure - learning curves for ridge regression and linear regression on the boston housing dataset as one would expectthe training score is higher than the test score for all dataset sizesfor both ridge and linear regression because ridge is regularizedthe training score of ridge is lower than the training score for linear regression across the board howeverthe test score for ridge is betterparticularly for small subsets of the data for less than data pointslinear regression is not able to learn anything as more and more data becomes available to the modelboth models improveand linear regression catches up with ridge in the end the lesson here is that with enough training dataregularization becomes less importantand given enough dataridge and supervised learning