
Stacking blender (Geron Ch 7, morie.fn grstk)
Source:R/geron_train_native.R
morie_geron_stacking_predictor.RdLeast-squares meta-learner (minimum-norm, matching numpy.lstsq) over out-of-fold base predictions, with an intercept by default.
Examples
morie_geron_stacking_predictor(base_preds = c(1, 2, 3, 4, 5, 6, 7, 8), y = 5L)
#> $predictions
#> [1] 5
#>
#> $weights
#> [1] 0.02439024 0.02439024 0.04878049 0.07317073 0.09756098 0.12195122 0.14634146
#> [8] 0.17073171 0.19512195
#>
#> $rmse
#> [1] 0
#>
#> $base_rmse
#> [1] 4 3 2 1 0 1 2 3
#>
#> $improvement
#> [1] 0
#>
#> $estimate
#> [1] 5
#>
#> $n
#> [1] 1
#>