This function returns a tibble with showing the models ranked closest to the supplied model. Usually chained with the magrittr pipe %>%.

peak(leadrboard, ..., n = 10, how = "centered")

Arguments

leadrboard

leaderboard tibble returned by board

...

a number, numbers, or vector of numbers to that correspond to model ids in the leaderboard. See at_last to easily specify model ids.

n

the number of rows to return. By default, the tibble will return 10 rows. peak will return a tibble with more than 20 rows, but the console output is limited by options(tibble.print_max), which has a default of 20.

how

takes values of c("centered", "above", "below"). Determines where to peak around the first number supplied to ....

Value

A subset of the leaderboard tibble. Given the supplied model ids, peak tries to return a tibble of length n. If the maximum distance between model ids are greater than n, peak will return the shortest tibble that includes all the models. In supporting consoles, the supplied model ids are highlighted.

Examples

# peak at last model saved 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 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 1 more variable: seeds <list>
# peak at models 1 and 2 board() %>% peak(1, 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 10. 10 model… rf Accura… 0.955 NA boot 25. 9. <lis… <lis… #> 2 11. 1 model… rf Accura… 0.955 NA boot 25. 1. <lis… <lis… #> 3 12. 25 model… rf Accura… 0.955 NA boot 25. 24. <lis… <lis… #> 4 13. 3 model… rf Accura… 0.955 NA boot 25. 3. <lis… <lis… #> 5 14. 24 model… rf Accura… 0.954 NA boot 25. 23. <lis… <lis… #> 6 15. 23 model… rf Accura… 0.954 NA boot 25. 22. <lis… <lis… #> 7 16. 9 model… rf Accura… 0.952 NA boot 25. 8. <lis… <lis… #> 8 17. 17 model… rf Accura… 0.952 NA boot 25. 16. <lis… <lis… #> 9 18. 2 model… rf Accura… 0.952 NA boot 25. 2. <lis… <lis… #> 10 19. 12 model… rf Accura… 0.951 NA boot 25. 11. <lis… <lis… #> # ... with 1 more variable: seeds <list>
board() %>% peak(c(1, 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 10. 10 model… rf Accura… 0.955 NA boot 25. 9. <lis… <lis… #> 2 11. 1 model… rf Accura… 0.955 NA boot 25. 1. <lis… <lis… #> 3 12. 25 model… rf Accura… 0.955 NA boot 25. 24. <lis… <lis… #> 4 13. 3 model… rf Accura… 0.955 NA boot 25. 3. <lis… <lis… #> 5 14. 24 model… rf Accura… 0.954 NA boot 25. 23. <lis… <lis… #> 6 15. 23 model… rf Accura… 0.954 NA boot 25. 22. <lis… <lis… #> 7 16. 9 model… rf Accura… 0.952 NA boot 25. 8. <lis… <lis… #> 8 17. 17 model… rf Accura… 0.952 NA boot 25. 16. <lis… <lis… #> 9 18. 2 model… rf Accura… 0.952 NA boot 25. 2. <lis… <lis… #> 10 19. 12 model… rf Accura… 0.951 NA boot 25. 11. <lis… <lis… #> # ... with 1 more variable: seeds <list>