0
$\begingroup$

enter image description here

I'm trying to model some year-on-year data, as seen in the picture, each line represents a different year. From 52 to 0 (x-axis) are the weeks leading up to the last point on the left. I have been trying XGBoost regression, based on individual data points. The columns I have are :

  • Year
  • Week Number (0-52)
  • Revenue (target, y-axis)

My main challenge is that I need to be able to model the "jumps" as you can see from the picture, one around week 29 and one around week 25. I know from domain knowledge that these are special events. I can get these "changepoint" weeks by differencing the numbers by year and setting a threshold for the differenced values.

How can I model these jumps in a way such that I can manually inject the jumps ahead of time for future prediction? Say for next year's data, I know the jump will occur at week 20, how can I manually tell the model to predict with this in mind? I have been getting very bad MAPE values thus far, in the hundreds.

$\endgroup$
3
  • $\begingroup$ If you have an equation you are curve fitting, and it has a parameter for the jump value, you can make that a known constant when fitting a data set. That should work, $\endgroup$ Oct 24, 2018 at 13:29
  • $\begingroup$ @JamesPhillips I have defined a column variable rev_diff that has the value 1 starting from the jump point. I have manually defined the rev_diff to be 1 from week 24 onwards to simulate the jump point in my test data but it still regresses to following the original training data's jump point at 28 weeks. (meaning it fits closer to the jump point at 28 weeks) $\endgroup$
    – lppier
    Oct 25, 2018 at 1:24
  • $\begingroup$ @JamesPhillips sorry I realised it does work. XGBoost requires some parameter tuning apparently. After I tuned the parameters it started to show signs of dependence on the jump pt variable $\endgroup$
    – lppier
    Oct 25, 2018 at 8:20

1 Answer 1

1
$\begingroup$

Build a Transfer Function model which includes memory structure (ARIMA) and needed deterministic structure like seasonal pulses *weeek 29 ..week 25 ". If you wish to post a data set I will try and help further ...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.