Open tomatoes-prog opened 2 months ago
Hi @tomatoes-prog, Thanks for using skforecast!
I think the problem here is a misunderstanding of the term "order". In skforecast
, a differentiation of order 2 means applying the differentiation process twice. We are following the same idea as numpy
.
import numpy as np
y = np.array([5, 8, 12, 10, 14, 17, 21, 19], dtype=float)
y_diff_1 = np.diff(y)
y_diff_2 = np.diff(y_diff_1)
y_diff_2
array([ 1., -6., 6., -1., 1., -6.])
np.diff(y, n=2)
array([ 1., -6., 6., -1., 1., -6.])
Do you want to differentiate once with the value 2 steps before?
Ohhh I got it now, yeah I thought about order as the distance between the steps that were going to be differentiated. Thanks for the explanation. And yes, I want to differentiate once with n-steps before, any suggestions? I am expecting this to have a better trend capture than 1 order differentiation
Unfortunately, Skforecast does not yet automate this type of differentiation. The other option at the moment is to differentiate the series before modeling. We will try to add this in the next releases.
Best
Hello, thanks for this great package.
I am having struggles forecasting a time series with trend, which have a almost weekly trend, i would like to use a 7 differentiation order in my ForecasterAutoreg object using this params
Nevertheless, when using the dummy example with a 2nd order differentiation the results are unexpected
Is this only working on order 1