Skip to content

inner_split(): global prop argument #493

@topepo

Description

@topepo

I've read #487...

Not certain yet but I feel like we will want users to be able to do something different from what the original split does.

If that's the case, I propose a global prop argument

inner_split <- function(x, ..., prop = NULL) {
  UseMethod("inner_split")
}

Global because some of the splitting arguments in each method has an argument with the same name. With one or two exceptions, the inner split can emulate the original scheme but hold more or less back (proportionally).

So let's save that we start with obj <- mc_cv(data, prop = 3/4) but we only want to give 10% to the potato calibration set. Irrespective or the original prop value in split_args, the global prop would take over with

inner_split(obj, split_args = list(prop = 3/4), prop = 0.1) 
# or just leave the list value out since it is not used

prop can be used with bootstrap, times series, and other types of splits too (except clustering)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions