This function returns the model ids for the last number models saved to leaderboard. This function is intended to be used with peak.

at_last(number = 1)

Arguments

number

number that indicates the last n models to peak at.

Value

model id of last models

Examples

# peak at previous model board() %>% peak(at_last())
#> # A tibble: 10 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 6. 8 model… rf Accura… 0.957 NA boot 25. 7. <lis… <lis… #> 2 7. 7 model… rf Accura… 0.957 NA boot 25. 6. <lis… <lis… #> 3 8. 18 model… rf Accura… 0.955 NA boot 25. 17. <lis… <lis… #> 4 9. 10 model… rf Accura… 0.955 NA boot 25. 9. <lis… <lis… #> 5 10. 1 model… rf Accura… 0.955 NA boot 25. 1. <lis… <lis… #> 6 11. 25 model… rf Accura… 0.955 NA boot 25. 24. <lis… <lis… #> 7 12. 3 model… rf Accura… 0.955 NA boot 25. 3. <lis… <lis… #> 8 13. 24 model… rf Accura… 0.954 NA boot 25. 23. <lis… <lis… #> 9 14. 23 model… rf Accura… 0.954 NA boot 25. 22. <lis… <lis… #> 10 15. 9 model… rf Accura… 0.952 NA boot 25. 8. <lis… <lis… #> # ... with 1 more variable: seeds <list>
# peak at last two models board() %>% peak(at_last(2))
#> # A tibble: 10 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 7. 7 model… rf Accura… 0.957 NA boot 25. 6. <lis… <lis… #> 2 8. 18 model… rf Accura… 0.955 NA boot 25. 17. <lis… <lis… #> 3 9. 10 model… rf Accura… 0.955 NA boot 25. 9. <lis… <lis… #> 4 10. 1 model… rf Accura… 0.955 NA boot 25. 1. <lis… <lis… #> 5 11. 25 model… rf Accura… 0.955 NA boot 25. 24. <lis… <lis… #> 6 12. 3 model… rf Accura… 0.955 NA boot 25. 3. <lis… <lis… #> 7 13. 24 model… rf Accura… 0.954 NA boot 25. 23. <lis… <lis… #> 8 14. 23 model… rf Accura… 0.954 NA boot 25. 22. <lis… <lis… #> 9 15. 9 model… rf Accura… 0.952 NA boot 25. 8. <lis… <lis… #> 10 16. 17 model… rf Accura… 0.952 NA boot 25. 16. <lis… <lis… #> # ... with 1 more variable: seeds <list>
# peak at last three models # and model 1 board() %>% peak(at_last(3), 1)
#> # A tibble: 10 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 7. 7 model… rf Accura… 0.957 NA boot 25. 6. <lis… <lis… #> 2 8. 18 model… rf Accura… 0.955 NA boot 25. 17. <lis… <lis… #> 3 9. 10 model… rf Accura… 0.955 NA boot 25. 9. <lis… <lis… #> 4 10. 1 model… rf Accura… 0.955 NA boot 25. 1. <lis… <lis… #> 5 11. 25 model… rf Accura… 0.955 NA boot 25. 24. <lis… <lis… #> 6 12. 3 model… rf Accura… 0.955 NA boot 25. 3. <lis… <lis… #> 7 13. 24 model… rf Accura… 0.954 NA boot 25. 23. <lis… <lis… #> 8 14. 23 model… rf Accura… 0.954 NA boot 25. 22. <lis… <lis… #> 9 15. 9 model… rf Accura… 0.952 NA boot 25. 8. <lis… <lis… #> 10 16. 17 model… rf Accura… 0.952 NA boot 25. 16. <lis… <lis… #> # ... with 1 more variable: seeds <list>
board() %>% dplyr::filter(id %in% at_last(3))
#> # A tibble: 3 x 13 #> rank id dir model metric score public method num group index tune #> <dbl> <id> <chr> <chr> <chr> <dbl> <dbl> <chr> <dbl> <dbl> <list> <lis> #> 1 11. 25 model… rf Accura… 0.955 NA boot 25. 24. <list… <lis… #> 2 13. 24 model… rf Accura… 0.954 NA boot 25. 23. <list… <lis… #> 3 14. 23 model… rf Accura… 0.954 NA boot 25. 22. <list… <lis… #> # ... with 1 more variable: seeds <list>