Update vfold.R#471
Merged
Merged
Conversation
bug correction with vfold_splits function forward on breaks value from the vfold_cv function to vfold_splits
Contributor
Author
|
Hello @hfrick, |
Member
|
Thanks for the indirect bug report and the PR! Here's the slightly reworked reprex for my own reference. With this PR: library(rsample)
iris_small <- iris[1:50,]
set.seed(123)
# default breaks = 4
folds <- vfold_cv(iris_small, v = 5, repeats = 2, strata = Petal.Width)
#> Warning: The number of observations in each quantile is below the recommended threshold of 20.
#> • Stratification will use 2 breaks instead.
#> The number of observations in each quantile is below the recommended threshold of 20.
#> • Stratification will use 2 breaks instead.
# this should not warn anymore
folds <- vfold_cv(iris_small, v = 5, repeats = 2, strata = Petal.Width, breaks = 2)Created on 2024-04-22 with reprex v2.1.0 |
Contributor
|
This pull request 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
this pull request is for bug correction with vfold_splits function
actually the vfold_splits function do not forward the breaks argument to vfold_splits call
Symptoms
the de fault breaks = 4 is used instead
obviously not forwarding the breaks argument
no error after vfold_splits call modification
Created on 2024-04-12 with reprex v2.1.0