hello I don't understand why these both target tr...
# mlforecast
g
hello I don't understand why these both target transformations (Autodifference and AutoSeasonalityAndDifferences ) don't give the same result when the unique id has only a trend ? Does it mean that it is necessary to isolate products that have seasonality before to transform by AutoSeasonalityAndDifferences ? Thank you in advance for your help
j
Hey. The AutoSeasonalityAndDifferences determines the season length (up to the max_season_length and takes that difference if it's significant) but doesn't consider single diferences, so you'd need to combine both to remove trend and seasonalities
g
Thank you for your answer but i am bit confused because if I take an other example with a strong seasonality and a trend, then AutoSeasonalityAndDifferences(max_season_length=12, max_diffs=1) removed the seasonality AND trend :s
j
Does that look the same if you take the 12th difference?
g
AutoDifferences(max_diffs=1)
AutoSeasonalityAndDifferences(max_season_length=12, max_diffs=12)
j
I meant just Differences([12])
g
Differences([12])
j
Seems like it's removing both since the trend is additive and matches exactly the seasonal period
g
i have added noise to not have perfect data : AutoSeasonalityAndDifferences(max_season_length=12, max_diffs=1) removed the trend and the seasonality
and if i take a product with only a trend it doesn't remove anything => so from my tests : trend is removed only if there is a seasonality
j
It removes the seasonality, which can also remove the trend if it matches. If you want to remove both for sure you can use AutoDifferences and then AutoSeasonalityAndDifferences
g
ok fine. thank you.