Skip to content

inner_split() methods for ordered resamples - #569

Merged
hfrick merged 10 commits into
mainfrom
ordered-inner-splits
Jun 25, 2025
Merged

hfrick merged 10 commits into
mainfrom
ordered-inner-splits

Conversation

@hfrick

@hfrick hfrick commented Jun 16, 2025

Copy link
Copy Markdown
Member

closes #556

This PR adds inner_split() methods for sliding_window_split, sliding_index_split and sliding_period_split objects as well as a writeup of our thinking on these. I've currently put this doc into inst/ since it's not outward-facing just yet.

@EmilHvitfeldt EmilHvitfeldt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall very nice. had some questions/suggestions

Comment thread R/inner_split.R Resolved
Comment thread R/inner_split.R Resolved
Comment thread R/inner_split.R
indices <- compute_complete_indices(id_in, id_out)

if (length(indices) < 1) {
cli::cli_abort("No calibration split possible.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer a more informative error here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, I totally agree. Currently the plan is to move away from errors but rather warn and give something of an empty object back, to facilitate smoothness in tune. I'd left a note on the issue about error vs warning about improving errors if that's the route we're taking. #570 (comment)

Comment thread R/inner_split.R Resolved
@hfrick
hfrick merged commit d4ef665 into main Jun 25, 2025
@hfrick
hfrick deleted the ordered-inner-splits branch June 25, 2025 13:08
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

Successfully merging this pull request may close these issues.

inner_split() methods for time-based resampling

2 participants