Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
2.98k stars 342 forks source link

Add REVIN functionality to Dlinear as a parameter option #956

Closed chaoticAttractoor closed 5 months ago

chaoticAttractoor commented 6 months ago

Description

The reversible instance normalization is a powerful transformation for the PatchTST model and the literature has shown that, applied to the DLinear model, it can outperforms the classic DLinear model (e.g. here) as well as transformer models with less computational overheads. I request the Revin class be incorporated in the DLinear model.

Use case

Revin - as a feature for DLinear will provide a more competive baseline benchmark for transformers and other SOTA models. Moreover, DLinear + Revin may provide a more accurate and computational efficient forecasting tool than other models in the library currently - improving the quality and functionality of the library.

elephaint commented 5 months ago

You can use scaler_type='revin' for DLinear.

Unfortunately for some models (like PatchTST, but also TSMixer) we had to separately include revin normalization as a feature to the model, hence the possible confusion. We hope to fix this inconsistency in the future.

Let me know if this works for you.

chaoticAttractoor commented 5 months ago

Oh awesome - yes this has worked perfectly. You can close this request then!