
Learning curve – train / val MSE vs training-set size (R parity)
Source:R/lrcvg.R
morie_learning_curve.RdManual implementation of the sklearn morie_learning_curve flow: shuffle, split into k folds, for each train-fraction fit on a prefix of the training fold and score on the held-out fold.
Examples
set.seed(1)
morie_learning_curve(x = rnorm(50), y = rnorm(50))
#> $estimate
#> [1] 0.9539456
#>
#> $train_sizes
#> [1] 4 13 22 31 40
#>
#> $train_scores
#> [1] 0.2567182 0.6734896 0.7965575 0.8384200 0.9145741
#>
#> $val_scores
#> [1] 1.0013865 0.9445885 0.9452066 0.9623601 0.9539456
#>
#> $n
#> [1] 50
#>
#> $method
#> [1] "Learning curve (cv MSE)"
#>