#general

Title

# general

c

Christian Ngnie

11/03/2023, 4:45 PMHi there, I see the use of exogeneous variables for predictions require knowing their future values, but is there a way to use their lags for predictions when we know they have significant impact in the predictions?

j

José Morales

11/03/2023, 4:57 PMHey. You should be able to do that if you want to, you probably just need to change the dates

✅ 1

c

Chris Gervais

11/04/2023, 12:27 PMNF supports both historical and lagged features but I’m not sure if a single column can be in both

c

Christian Ngnie

11/06/2023, 3:19 PMj

José Morales

11/06/2023, 3:19 PMWhich library are you using?

c

Christian Ngnie

11/06/2023, 3:20 PMStatsforecast and MLforecast. both require having future exogeneous variables

j

José Morales

11/06/2023, 3:24 PMIn statsforecast I think the dates aren't checked, so you can just provide a dataframe with the correct shape, e.g. if you have 10 series and are forecasting 5 periods it should have 50 rows. In mlforecast the dates are checked, so you'd have to offset the dates in your future dataframe so that the first date is the one immediately after your last training date for each serie.

c

Christian Ngnie

11/15/2023, 3:26 PMHi **@José Morales**, quick question. Do Statsforecast and MLforecast handle non-stationary data? if yes how please?

j

José Morales

11/15/2023, 5:03 PMHey. In statsforecast it depends on the model, the ARIMA model for example will take differences and seasonal differences to try to make it stationary. In mlforecast you can use target transformations

c

Christian Ngnie

11/15/2023, 5:03 PMGreat Thanks

j

José Morales

11/16/2023, 3:22 PMHey. To restore the original values we only invert the transformation, e.g. for the standard scaler we multiply by the standard deviation and add back the mean

c

Christian Ngnie

11/16/2023, 4:08 PMOk Thanks. I'm asking because I know some simple inverse (like power transform, box_cox not sure for difference) induce bias, that needs to be corrected, in the "original" space. https://robjhyndman.com/hyndsight/backtransforming/
https://github.com/scikit-learn/scikit-learn/issues/15881

j

José Morales

11/16/2023, 4:21 PMThey don't adjust for bias at the moment

although I think those problems only happen with power transformations like boxcox, the other scalers and differences should be fine

✅ 1