damitkwr / ESRNN-GPU

PyTorch GPU implementation of the ES-RNN model for time series forecasting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to change for different timeframe

stefaj opened this issue · comments

How would one update the config for Hourly or Daily ?

On Daily I seem to be getting errors.

On hourly I have in the config:

'chop_val': 200,
'variable': "Hourly",
'dilations': ((1, 12), (12, 24)),
'state_hsize': 50,
'seasonality': 24,
'input_size': 24,
'output_size': 48,
'level_variability_penalty': 50

and I get the error

input.size(-1) must be equal to input_size. Expected 30, got 25

On Daily (default) I have:

'chop_val': 200,
'variable': "Daily",
'dilations': ((1, 7), (14, 28)),
'state_hsize': 50,
'seasonality': 7,
'input_size': 7,
'output_size': 14,
'level_variability_penalty': 50

and I get the error:

ValueError: Item wrong length 4226 instead of 4227.

Any advice on how to proceed would be appreciated

commented

I can reproduce the bug, its a bug in the DataLoader I believe.

In data_loading.py, I've changed read_file function to this:

def read_file(file_location):
    df = pd.read_csv(file_location) 
    df = df.iloc[:, 1:]
    lst = df.stack().groupby(level=0).apply(list).tolist()
    return np.array(lst)

and it works for me.
I didn't noticed configs for: Weekly and Hourly in config.py

For hourly M4 data there was only one category. Change

'num_of_categories': 6,

to

'num_of_categories': 1,

in config.py