https://github.com/nixtla logo
#neural-forecast
Title
# neural-forecast
p

Pascal Schindler

05/17/2023, 4:50 PM
Hey, maybe you can help me here: I use Auto-NHITS with the standard parameters to forecast the following timeseries: Unfortunately, I get an MAPE of 35%. With which parameters should I play to increase the accuracy?
f

Farzad E

05/17/2023, 4:59 PM
I don't know your data but MAPE is not a good measure to use specially if your data has values close to zero in some regions. No matter what your absolute error is, you will be dividing by zero or something very close to zero and you may end up with large numbers. I had the same issue and I moved away from MAPE and started using MAE to understand the performance of my models.
p

Pascal Schindler

05/17/2023, 7:25 PM
So this is just the training data, not the evaluation data. Nevertheless, do you have any experiences for the hyperparameters? Also from my experience, exogenious variables have nearly no effect or even worsen the results
c

Cristian (Nixtla)

05/17/2023, 7:55 PM
Hi @Pascal Schindler. The spikes of the time series appear to be somehow random. No model will be able to predict those spikes without additional information. The high MAPE might be driven by those unpredictable spikes. I also recommend you to fit simpler models as baselines from
statsforecast
.
💯 1
f

Farzad E

05/17/2023, 8:04 PM
@Pascal Schindler as Cristian suggested, the spikes will be hard to predict. If you don't care about the spikes (i.e., you can consider them outliers), then you can use moving averages to smooth them out or if you work with frequency techniques, you can use a low pass filter to remove them. That or find a feature that is correlated with the spikes.
c

Chris Gervais

05/18/2023, 10:40 AM
Looks a lot like power prices, in which case add the reserve margin features and a ton of planned transmission outages 🥸
p

Pascal Schindler

05/18/2023, 1:22 PM
It is actually sales data of an e-commerce brand
Must be website traffic that leads to the spikes
k

Kin Gtz. Olivares

05/18/2023, 4:28 PM
Hey @Pascal Schindler, We recently included a HuberLoss function that is robust to outliers: - https://nixtla.github.io/neuralforecast/losses.pytorch.html#huberloss Another idea is to try gradient clipping. Or preprocessing to skip the outliers. Let us know if the HuberLoss helps you.
👀 1
Hey @Pascal Schindler, We just recently added also HuberMQLoss and this [robust regression tutorial](https://nixtla.github.io/neuralforecast/examples/robust_regression.html). Let us know if they help