neural_prophet icon indicating copy to clipboard operation
neural_prophet copied to clipboard

Bugfix: return correctly scaled multiplicative seasonality component

Open denyslazarenko opened this issue 3 years ago • 2 comments

Resolve issue: https://github.com/ourownstory/neural_prophet/issues/429 Used hint: trend = trend(scaled)*y_scale + y_shift season_x = season_x(scaled) *y_scale season_x_m = season_x_m(scaled)*trend(scaled)y_scale season_x_m = season_x_m(scaled)(trend - y_shift)

denyslazarenko avatar Feb 18 '22 16:02 denyslazarenko

based on our conversation's new logic: for all components (except trend)

  • multiply with scale Then, for all multiplicative terms:
  • multiply with (raw/normalized) trend Finally
  • multiply trend with scale, add shift

Now, multiplicative terms are no longer in 0-1 scale -> need make sure plotting does not get messed up

ourownstory avatar Feb 18 '22 23:02 ourownstory

Hello @ourownstory and @denyslazarenko,

Thanks in deep for your clarification. However, it is still not clear for me how to transform the data. In particular, I have the following questions:

  • trend(scaled): does it mean to scale between 0 and 1 the trend?
  • what do you mean by y_scale?
  • what do you mean by y_shift?
  • Once I have performed these transformations, can I apply the following formula? Yhat = trend * (1 + multiplicative terms) + additive terms

A code example will be great.

I would like to take this opportunity to thank you for the excellent work you are doing on this project.

Best,

rbeldagarcia avatar Sep 19 '22 06:09 rbeldagarcia

merged in #791

ourownstory avatar Oct 15 '22 20:10 ourownstory