This will use a different test set for each iteration (i.e. each `n_train_samples`), making the curve less stable than if constant training sample was used. Instead, do CV once for the entire dataset, and just take a prefix of training samples.