kdgutier / esrnn_torch

MIT License
156 stars 45 forks source link

NAN for evaluation metrics #6

Closed FangSimon closed 4 years ago

FangSimon commented 4 years ago

Hi there,

I am running into a similar problem as reported in a previous issue. While I do get a value for training loss and testing loss, I get a nan for my evaluation metrics: sMAPE, MASE and OWA, when I am fitting the model. The response below is when I am fitting the model with weekly data:

Infered frequency: W-SUN
=============== Training ESRNN ===============

========= Epoch 0 finished =========
Training time: 12.04543
Training loss (50 prc): 0.49441
Testing loss (50 prc): 0.02670
OWA: nan
SMAPE: nan
MASE: nan

I have checked and there are no zeroes in the first ds. What could be causing the problem?

kdgutier commented 4 years ago

Hi Fang, when that happened to me the most common cause is a mismatch between the horizons of the forecast and your test series.

FangSimon commented 4 years ago

Hi Kin, Thanks for the comment. I think one of the reasons was the seasonality. It is solved now! Thanks for developing this open-source library.

FangSimon commented 4 years ago

Sorry for re-opening this again, but I am trying to make this work on the M3 data. Again, I get the same issue. How do you specify the forecasting horizons in the fitting method?