Generate the train and validation errors
needed to plot a validation curve that we can use to select lambda