Skip to content

Comments

feat: add generate_ts_folds for time-series#24

Open
ozio1212 wants to merge 2 commits intodevfrom
modelling/cross_validation_folds
Open

feat: add generate_ts_folds for time-series#24
ozio1212 wants to merge 2 commits intodevfrom
modelling/cross_validation_folds

Conversation

@ozio1212
Copy link
Member

Introduce cross_validation_folds.py with generate_ts_folds to create expanding-window time-series cross-validation folds. The function standardizes timestamps, enforces timezone consistency, validates parameters, and raises ValueError for invalid ranges.

Returns a list of fold dicts (train_start, train_end, val_start, val_end) formatted as ISO date strings.

Introduce cross_validation_folds.py with generate_ts_folds to create expanding-window time-series cross-validation folds. The function standardizes timestamps, enforces timezone consistency, validates parameters, and raises ValueError for invalid ranges.

Returns a list of fold dicts (train_start, train_end, val_start, val_end) formatted as ISO date strings.
Extend generate_ts_folds to support sub-day frequencies (hours, minutes) via a new freq parameter.
@ozio1212
Copy link
Member Author

I don't know how it's happened that previous commit was only for day granularity. Sorry for the trouble, correct function is in the latest commit.

PrayFeetGIF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant