Differentiate between initial split and splits in resamples in the accessor functions `training()`/ `testing()` / `analysis()`/`assessment()`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the training(), testing(), analysis(), and assessment() accessors, then inspect how initial_split() and vfold_cv() represent their rsplit objects. Confirm the existing accessor behavior and tests before changing it; done means initial splits reject analysis()/assessment(), while resample splits reject training()/testing().
Written by the indexing model from the issue text.
Description
TMwR calls the elements of the initial split "training" and "testing" set and the elements of the a resample "analysis" and "assessment" set.
In rsample, both of those types of splits are rsplit objects and all of training()/ testing() / analysis()/assessment() work on all rsplit objects. We should be more consistent with that conceptual difference and make training()/ testing() work only on initial splits and analysis()/assessment() only on splits in resamples.
library(rsample)
split_init <- initial_split(mtcars)
cars_train <- training(split_init)
cars_analysis <- analysis(split_init) # this should error
folds <- vfold_cv(mtcars, v = 3)
fold_1 <- folds$splits[[1]]
analysis_1 <- analysis(fold_1)
train_1 <- training(fold_1) # this should error
Created on 2022-12-06 with reprex v2.0.2
- Dominant language
- R
- Stars
- 343
- Forks
- 67
- Avg merge
- 1h 9m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tidymodels/rsample
-
tidy-dev-day :nerd_face:
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
tidymodels/rsample#611 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
tidymodels/rsample#607 ·
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 68/100
tidymodels/rsample#608 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tidymodels/rsample#600 ·
-
upkeep
Difficulty 3/5 1-2 days Newbie friendliness 45/100
tidymodels/rsample#595 ·
All issues in tidymodels/rsample
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·