Skip to content

FIX: Insample predictions with multivariate model#1271

Closed
marcopeix wants to merge 2 commits intomainfrom
fix/insample_prediction_multivariate
Closed

FIX: Insample predictions with multivariate model#1271
marcopeix wants to merge 2 commits intomainfrom
fix/insample_prediction_multivariate

Conversation

@marcopeix
Copy link
Contributor

Currently, insample predictions do not work for multivariate model; they miss input_size values. This is likely due to padding not being applied for early timesteps when creating windows for multivariate models.

This fix allows padding, just like in BaseWindows. This fixes the problem of insample predictions with multivariate models.

I tested the performance of some multivariate models, and padding does not impact performance.

I also added a multivariate model to the insample predictions tests.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@marcopeix marcopeix marked this pull request as ready for review February 21, 2025 21:08
@marcopeix marcopeix requested a review from elephaint February 21, 2025 21:08
"\n",
" if step == 'predict':\n",
" initial_input = temporal.shape[-1] - self.test_size\n",
" if initial_input <= self.input_size: # There is not enough data to predict first timestamp\n",
Copy link
Contributor

@elephaint elephaint Feb 24, 2025

Choose a reason for hiding this comment

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

Nice! I think only a unit test to verify that this works as intended?

@marcopeix
Copy link
Contributor Author

Insample predictions with multivariate models now works with the merge of #1023 . Closing as this PR is not necessary anymore.

@marcopeix marcopeix closed this Feb 24, 2025
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.

[Core] predict_insample with multivariate models gives NaN values on last input_size

2 participants