Skip to content

Fix (neuraforecast/core/cross-validation): Raise Exception when val_size+test_size is greater than min size of series.#1097

Closed
marcopeix wants to merge 3 commits intomainfrom
hotfix/cv-valtest-size
Closed

Fix (neuraforecast/core/cross-validation): Raise Exception when val_size+test_size is greater than min size of series.#1097
marcopeix wants to merge 3 commits intomainfrom
hotfix/cv-valtest-size

Conversation

@marcopeix
Copy link
Contributor

Right, if val_size+test_size is greater than the min size of a series, we show a warning, but the code still tries to run. In my test using the ETTm1 dataset, the following didn't fail immediately, but ran indefinitely:

nf.cross_validation(Y_df, val_size=2000000, test_size=2000000, n_windows=None)

I think it should raise an exception instead and stop running. I think this should solve #400

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jmoralez
Copy link
Contributor

jmoralez commented Aug 1, 2024

I think the underlying issue is that a bunch of windows filled with zeros are used for training, so this would be fixed by #1059.

@marcopeix
Copy link
Contributor Author

I think the underlying issue is that a bunch of windows filled with zeros are used for training, so this would be fixed by #1059.

Would it also solve #400 ?

@jmoralez
Copy link
Contributor

jmoralez commented Aug 1, 2024

I don't know what that means by "breaks". Do you get an error if you specify those numbers to be just slightly above the minimum length?

@marcopeix
Copy link
Contributor Author

I don't know what that means by "breaks". Do you get an error if you specify those numbers to be just slightly above the minimum length?

I get other errors, like Exception: Time series is too short for training, consider setting a smaller input size or set start_padding_enabled=True. You're right, the issue is not clear. I will ask for clarification and close this PR as it seems to introduce more problems than solutions.

@marcopeix marcopeix closed this Aug 2, 2024
@marcopeix marcopeix deleted the hotfix/cv-valtest-size branch August 2, 2024 14:13
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.

2 participants