Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmayer committed Aug 13, 2024
1 parent 9950900 commit e461219
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ print(summary(models))
#> Model accuracy:
#> model_name metric value sd
#> <char> <char> <num> <num>
#> 1: rf RMSE 1168.108 422.9558
#> 2: glmnet RMSE 1152.298 138.8310
#> 1: rf RMSE 1110.199 114.5286
#> 2: glmnet RMSE 1256.668 100.4436
```

Then, use caretEnsemble to make a greedy ensemble of these models
Expand All @@ -67,18 +67,18 @@ print(greedy_stack)
#> Summary of sample sizes: 400, 400, 400, 400, 400
#> Resampling results:
#>
#> RMSE Rsquared MAE
#> 1096.53 0.933482 631.215
#> RMSE Rsquared MAE
#> 1015.885 0.9364999 572.8984
#>
#> Tuning parameter 'max_iter' was held constant at a value of 100
#>
#> Final model:
#> Greedy MSE
#> RMSE: 1067.635
#> RMSE: 1031.297
#> Weights:
#> [,1]
#> rf 0.43
#> glmnet 0.57
#> rf 0.63
#> glmnet 0.37
```

You can also use caretStack to make a non-linear ensemble
Expand All @@ -98,7 +98,7 @@ print(rf_stack)
#> Resampling results:
#>
#> RMSE Rsquared MAE
#> 1005.629 0.9423501 490.6683
#> 1020.387 0.9363342 527.8525
#>
#> Tuning parameter 'mtry' was held constant at a value of 2
#>
Expand All @@ -110,8 +110,8 @@ print(rf_stack)
#> Number of trees: 500
#> No. of variables tried at each split: 2
#>
#> Mean of squared residuals: 1007817
#> % Var explained: 94.29
#> Mean of squared residuals: 1065781
#> % Var explained: 93.33
```

Use autoplot from ggplot2 to plot ensemble diagnostics:
Expand Down
Binary file modified man/figures/README-greedy-stack-6-plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e461219

Please sign in to comment.