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
Training with common covariate for multiple timeseries #444
Comments
@Sigvesor - Having a very similar problem. First things first - (1) what type of global model are you using (Transformer?); (2) are you receiving errors with the "past_covariates" argument in FIT? I keep receiving an unexpected argument error (wish I had the exact verbiage right now but no dice)... |
Hello, On principles, as far as I can tell what you're doing seems quite correct, but note three things:
Note that in the above snippet
@GregoryCrysler not all models accept Hope this helps. |
Thanks so much for the reply @hrzn,
Simplified, but something like this: ` generator_forecast_final = generator_forecast * P_max
The parallel I am thinking that I can draw to hydro generators, is then to use data on water level as a past covariate, and then use rainfall as a future covariate, to predict the hydro production. Is that reasonable? Thank you so much in advance for taking the time. Really appreciate it. |
This does not happen. If the model is fit using melting only, then melting only has to be provided at prediction time. If it's fit with both melting and rainfall (like on the last example in the article), then both melting and rainfall have to be provided at prediction time.
That's very much a domain-specific question ;) I guess it's reasonable. It all depends what data is known in the future. If it's known in the future, you can use it as a |
@hrzn - to echo @Sigvesor , really grateful for your time on this issue. **(1) The article (https://medium.com/unit8-machine-learning-publication/time-series-forecasting-using-past-and-future-external-**data-with-darts-1f0539585993) mentions that "Past covariates models: BlockRNNModel, NBEATSModel, TCNModel, TransformerModel In [36]: type(training_set_AUR_scl) In [37]: type(valid_set_TOTAL_IMP_scl) In [38]: type(valid_set_AUR_scl) In [44]: type(training_set_Avails_Cov) (5) I'm still getting an error on the fit: In [45]: my_model.fit(series=[training_set_TOTAL_IMP_scl, training_set_AUR_scl], val_series=[valid_set_TOTAL_IMP_scl, valid_set_AUR_scl], past_covariates= training_set_Avails_Cov, verbose=True)
|
@GregoryCrysler please use Darts 0.10.1, the signature has changed in 0.10.0. |
I am also having trouble with: and also the predict() function, the same error. I am using Darts 0.10.1 |
@hrzn I am using the RNNModel, ts_train is a list of TimeSeries rnn_model.fit(ts_train, past_covariates=[wl_train for _ in range(len(ts_list))], verbose=True)
|
As explained in the article, the RNNModel does not support past_covariates, only future_covariates. |
Update: @hrzn - I'd be grateful for any advice on the issue below. I've given some thought to the issue and I still can't figure out why there should be a problem. @hrzn - thanks for the advice to update to 0.10.1. I know this has been a long thread so, again, grateful for your help. Last question and I hope I've made this easy to understand:
1. Given 3 TimeSeries, each having Train,Valid components (all are aligned along the same axis). 2. The statement below runs just fine 3. Again, the below runs just fine 4. Once again, just fine 5. But, extending (4) to include a validation series like below errors out with message "ValueError: The dimensions of the series in the training set and the validation set do not match." |
@GregoryCrysler you need to pass covariates for the validation set as well, as per documentation. I had the same problem: #1140. |
Hello,
I want to train a global forecasting model for energy production from several generators.
The generators are all in roughly the same geographical area (loc1), so I will assume that they share climate feature (common_climate_covariate_loc1).
So I want to fit 25 generator TimeSeries to the model, and include a common covariate TimeSeries.
Will this be the right way to approach this problem?
model_cov.fit(series=[gen1_loc1, gen2_loc1, ... , genX_loc1],
past_covariates=[common_climate_covariate_loc1],
verbose=True)
where: gen1_loc1 is generator1 from location 1 and so on...
and later on, if I want to train the same model with 25 other generators that are from a different area (loc2) and have different climate data, do I just repeat the process and fit the new data to the same model?
model_cov.fit(series=[gen_loc2_1, gen_loc2_2, ... , gen_loc3_X],
past_covariates=[common_climate_covariate_loc2],
verbose=True)
where: gen1_loc2 is generator1 from location 2 and so on...
Will this be the correct procedure?
I hope I made the problem clear, thanks in advance for response.
The text was updated successfully, but these errors were encountered: