Hi, I ran the below AutoNHITS model using neuralfo...
# neural-forecast
s
Hi, I ran the below AutoNHITS model using neuralforecast version == 1.5.0: The results look fine.
Copy code
from ray.tune.search.basic_variant import BasicVariantGenerator
models = [AutoNHITS(h=61,
          config=nhits_config,
          loss=MAPE(),
          search_alg=BasicVariantGenerator(random_state=42),
          num_samples=100)]
nf = NeuralForecast(
  models=models,
  freq='D')
Y_hat_df = nf.cross_validation(df=Y_df, val_size=val_size,
                test_size=test_size, n_windows=None)
When I run the same AutoNHITS model using neuralforecast version 1.6.2 (the latest version), the train loss step, train loss epoch for all configs turn to zero. The predictions are also zero. Did something change in the latest version? I have attached the pics of the same. Thanks.
c
Hi @Shreya Mathur! I will take a look, we have not encountered this issue before. I strongly suggest to not train the model with the MAPE loss, because it is often very unstable, specially when
y
is close to zero or you are normalizing the data. Can you try with other losses? Like
MAE
,
MSE
, or
HuberLoss
?
yes, there was an issue in particular with the
MAPE
loss. I just fixed it and will be merged to main and released soon
👍 1
Even with this fix, I suggest using more stable losses such as
MAE
,
RMSE
, and
HuberLoss
👍 1
or
SMAPE
s
Got it, thankyou Cristian for helping with this issue.