tidymodels / TMwR

Code and content for "Tidy Modeling with R"
https://tmwr.org
Other
579 stars 272 forks source link

Numbers not matching up in section 10.2 code output vs text #336

Closed nkbxwb closed 1 year ago

nkbxwb commented 1 year ago

This is in reference to the digital book Version 1.0.0 (2022-09-22)

Comments or questions on the content

The issue is in chapter 10.2.1 CROSS-VALIDATION

You write the line...

...[2K/220] indicates that roughly two thousand samples are in the analysis set and 220 are in that particular assessment set.

the value in square brackets is hard coded, but it seems that the underlying data has changed, as the r code in chunk resampling-ames-cv now outputs a split size of <split [2107/235]> (this is the number I see from the first split)

you could likely just substitute the code you already wrote a few lines later to make it stay in synch with what you have

(ames_folds$splits[[1]] %>% analysis() %>% dim())[1] ' '(ames_folds$splits[[1]] %>% assessment() %>% dim())[1]'

image

Thanks for writing this book-- it is excellent! :)

github-actions[bot] commented 1 year ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.