Skip to content

How to pass a variable to group_vfold_cv's partition number argument #81

@htlin

Description

@htlin

Hi,
I like to make a few nested_cv's based on the same partition configuration as follows:

outer_cv <- 5
inner_cv <- 4
sampling1 <- nested_cv(all_dataset,
                      outside = group_vfold_cv(v = outer_cv, group = "Rep"),
                      inside = group_vfold_cv(v = inner_cv, group = "Rep"))
sampling2 <- ...
...

However, I am getting

object 'outer_cv' not found

error, which is out of the scope for the group_vfold_cv function.
Do you have any recommendations? Does tidy evaluation help in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions