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

[QUESTION] Why does actually RNN Models not supports future and past covariates at the same time ? #2563

Open
anilozcan35 opened this issue Oct 17, 2024 · 2 comments
Labels
question Further information is requested

Comments

@anilozcan35
Copy link

anilozcan35 commented Oct 17, 2024

While RNN model only supports future covariates BlockRNN only supports the past covariates.

https://unit8co.github.io/darts/generated_api/darts.models.forecasting.rnn_model.html?highlight=rnn#darts.models.forecasting.rnn_model.RNNModel

I did not know there was two different model called BlockRNN and RNN. How does this two differs in a sense mathematically so that one of them is support past covariates and the other is not ?

@anilozcan35 anilozcan35 added question Further information is requested triage Issue waiting for triaging labels Oct 17, 2024
@madtoinou
Copy link
Collaborator

Hi @anilozcan35,

These two models have a slightly different architecture/approaches;

  • RNNModel network only accept input_chunk_length=1 to generate a forecast and an hidden state. When output_chunk_length>1, it relies on the previous iteration forecast plus the hidden state to generate a new forecast (and hidden state). According to Darts convention, it also means that if it supported past_covariates, it would only consume one value (the very first input, used to generate the first forecast) which is rarely useful. Hence, it belongs to the DualCovariates class, meaning that it will actually consume both "past" and "future" values of the future_covariates series (as most of the regression models in Darts are able to do).
  • BlockRNN however, process all the input in blocks (fixed-length) and will take input_chunk_length values from both the target and past_covariates series in order to forecast output_chunk_length values in one pass. It should be possible to make it support future covariates (not sure why it's not already the case), WDYT @dennisbader?

I would recommend having a look at the source code if you want to better understand what is happening under the hood :)

@madtoinou madtoinou removed the triage Issue waiting for triaging label Oct 24, 2024
@dennisbader
Copy link
Collaborator

@madtoinou Yes, if we can add future coariates that would be great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants