tidymodels / tidymodels/rsample

repeats attribute is hardcoded to 1 for group_vfold_cv()

Open Beginner friendly
#607 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.