unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.55k stars 829 forks source link

[BUG] TimeSeries.from_group_dataframe() with RNNModel predicts static values for entire validation dataset #1219

Closed sindre-bouvet closed 1 year ago

sindre-bouvet commented 1 year ago

Describe the bug When trying to use an RNNModel to predict future values from a timeseries defined in a TimeSeries.from_group_dataframe I get just static values. I.e. the same values for the entire validation set.

To Reproduce I thought it would be simpler to show in a Kaggle Notebook: https://www.kaggle.com/sindreedelange/tps22sep-timeseries-forecast-w-darts

Expected behavior I expect the trained RNNModel to provide some sort of logical prediction values.

System (please complete the following information):

Additional context I have read all of the documentation I could come over, but I was unable to find a clear and concise example of how to split a TimeSeries.from_group_dataframe into train and val dataset, and then train a model on the train data, and validate on the val set.

hrzn commented 1 year ago

Hi, at first sight it looks like a converge problem rather than anything else. Your training loss is 4.29e+4. Did you scale/standardise the series?

sindre-bouvet commented 1 year ago

Hi @hrzn, and thank you for the response! I have tried to normalize the dependent variable now: 'num_sold' using scipy.stats' boxcox, but I still get the same result: the same value for all predictions - though, different values than before normalizing the value. NOTE: Now with training loss: 2.450

sindre-bouvet commented 1 year ago

Essentially, I am looking for some documentation/examples for dealing with use cases often seen on Kaggle competitions: Here is a data set with x columns, predict a value for column y.