caret
train
objectsThis function updates and returns the model leaderboard for the project. Please read the README and the introduction vignette.
board(model = NULL, path = NULL, dir = NULL, save = TRUE, quiet = FALSE)
model | model to add to the leaderboard. If no model is supplied
(the default |
---|---|
path | globally sets the path to save models and leaderboards. By
default, the path is the project directory found by. For best results, the path
string should be constructed with |
dir | globally sets name of directory where models are saved.
This will be a subdirectory of the specified path. The default directory
is named |
save | whether |
quiet | whether |
tibble
containing the most up-to-date leaderboard.
# add caret model to leaderboard # model saved to "models_one" model <- train(...)#> Error in train(...): could not find function "train"#> # A tibble: 26 x 13 #> rank id dir model metric score public method num group index tune #> <dbl> <id> <chr> <chr> <chr> <dbl> <dbl> <chr> <dbl> <dbl> <lis> <lis> #> 1 1. 26 model… glmnet Accur… 0.973 NA cv 5. 25. <lis… <lis… #> 2 2. 5 model… glmnet Accur… 0.964 NA boot 25. 1. <lis… <lis… #> 3 3. 14 model… rf Accur… 0.959 NA boot 25. 13. <lis… <lis… #> 4 4. 20 model… rf Accur… 0.959 NA boot 25. 19. <lis… <lis… #> 5 5. 22 model… rf Accur… 0.958 NA boot 25. 21. <lis… <lis… #> 6 6. 11 model… rf Accur… 0.958 NA boot 25. 10. <lis… <lis… #> 7 7. 8 model… rf Accur… 0.957 NA boot 25. 7. <lis… <lis… #> 8 8. 7 model… rf Accur… 0.957 NA boot 25. 6. <lis… <lis… #> 9 9. 18 model… rf Accur… 0.955 NA boot 25. 17. <lis… <lis… #> 10 10. 10 model… rf Accur… 0.955 NA boot 25. 9. <lis… <lis… #> # ... with 16 more rows, and 1 more variable: seeds <list>#> # A tibble: 26 x 13 #> rank id dir model metric score public method num group index tune #> <dbl> <id> <chr> <chr> <chr> <dbl> <dbl> <chr> <dbl> <dbl> <lis> <lis> #> 1 1. 26 model… glmnet Accur… 0.973 NA cv 5. 25. <lis… <lis… #> 2 2. 5 model… glmnet Accur… 0.964 NA boot 25. 1. <lis… <lis… #> 3 3. 14 model… rf Accur… 0.959 NA boot 25. 13. <lis… <lis… #> 4 4. 20 model… rf Accur… 0.959 NA boot 25. 19. <lis… <lis… #> 5 5. 22 model… rf Accur… 0.958 NA boot 25. 21. <lis… <lis… #> 6 6. 11 model… rf Accur… 0.958 NA boot 25. 10. <lis… <lis… #> 7 7. 8 model… rf Accur… 0.957 NA boot 25. 7. <lis… <lis… #> 8 8. 7 model… rf Accur… 0.957 NA boot 25. 6. <lis… <lis… #> 9 9. 18 model… rf Accur… 0.955 NA boot 25. 17. <lis… <lis… #> 10 10. 10 model… rf Accur… 0.955 NA boot 25. 9. <lis… <lis… #> # ... with 16 more rows, and 1 more variable: seeds <list># save to different directory ensemble <- train(...)#> Error in train(...): could not find function "train"#> Error in leadr::board(ensemble, dir = "ensembles_one"): object 'ensemble' not found# board automatically saves to previous directory # model saved to "ensembles_one" ensemble2 <- train(...)#> Error in train(...): could not find function "train"#> Error in leadr::board(ensembles2): object 'ensembles2' not found