tidymodels / tidymodels/rsample
repeats attribute is hardcoded to 1 for group_vfold_cv()
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 343
- Forks
- 67
- Avg merge
- 1h 9m
- Merged PRs (30d)
- 2
Description
The problem
There's a typo at vfold.R:318:
repeats = 1,
rather than setting repeats = repeats as is done for forming vfold_cv()'s attribute list at vfold.R:128.
Workaround in user code's just to update the attribute to the correct value
crossValidationFolds = group_vfold_cv(..., repeats = repeatCount)
attr(crossValidationFolds, "repeats", exact = TRUE) = repeatCount
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.
Research direction
Start in R/vfold.R at line 318, where group_vfold_cv() builds its attribute list, and compare it with the repeats handling at line 128 for vfold_cv(). Done means the group_vfold_cv() result records the repeats value supplied by the caller instead of always recording 1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100