Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inner_split(): keep everything inside of split_args or not? #487

Open
hfrick opened this issue May 22, 2024 · 1 comment
Open

inner_split(): keep everything inside of split_args or not? #487

hfrick opened this issue May 22, 2024 · 1 comment

Comments

@hfrick
Copy link
Member

hfrick commented May 22, 2024

Should we disambiguate split_args—the arguments supplied to the function that generated the object—and additional arguments—in this case, prop—in the function signature?

Originally posted by @simonpcouch in #483 (comment)

@hfrick
Copy link
Member Author

hfrick commented May 22, 2024

More from Simon:

I guess what I'm suggesting is that the answer to this comment is "yes" and we'd call inner_split() from tune/workflows as:

  split_args <- get_split_args(r_set)
  r_split <- get_rsplit(r_set, 1)

  # ...where prop is extracted from `add_tailer(prop)`
  isplit <- inner_split(r_split, split_args, prop = .8)

rather than:

  split_args <- get_split_args(r_set)
  r_split <- get_rsplit(r_set, 1)
  # since the r_set doesn't know where the supplied data comes from (or whether
  # it was generated by `initial_split()` or friends)
  split_args$prop <- .8

  isplit <- inner_split(r_split, split_args)

@hfrick hfrick changed the title inner_spilt(): keep everything inside of split_args or not? inner_split(): keep everything inside of split_args or not? May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant