prophet icon indicating copy to clipboard operation
prophet copied to clipboard

Setting additive/multiplicative models for external regressors

Open denizn opened this issue 8 years ago • 6 comments

Hello,

Can I change how regressors in the model are modeled?

For example: Promo_Impact : multiplicative Seasonality : multiplicative Christmas Day : additive

Can I set that?

Thanks, Deniz

denizn avatar May 24 '18 05:05 denizn

This is possible in the next version, and you can try it out now by installing the v0.3 branch as described in #254.

You would then do m = Prophet(seasonality_mode='multiplicative'), and then add an extra regressor for Christmas with m.add_regressor('Christmas', mode='additive'). I'll be writing full documentation for this and pushing out the new version soon.

bletham avatar May 25 '18 03:05 bletham

Ben,

The library has been extremely well up to now. I am wondering if it has an "Auto" feature to decide what is the best for seasonality, and regressors.

Does the future version have an auto feature that decides on below for regressors?

  1. 'Multiplicative'
  2. 'Additive'

Does it currently have an auto feature that decides on trend/seasonality: a) Linear b) Exponential b) Constant c) Zero

Thanks, Deniz

denizn avatar May 25 '18 03:05 denizn

There are not automatic selectors for any of those things. I think in most applications there is an option that is the natural fit to the problem (additive/multiplicative seasonality, linear/logistic trend). Additive/multiplicative seasonality seems like it could be automatically selected using the cross_validation tool, but you'd need to write the logic for that yourself. For linear vs. logistic trend, the logistic trend requires having floor and cap for the time series. Problems that have those anyway probably need the logistic trend.

bletham avatar May 26 '18 01:05 bletham

Cross validation on which library? statsmodels?

denizn avatar May 26 '18 01:05 denizn

The built-in cross validation functionality here: https://facebook.github.io/prophet/docs/diagnostics.html (And improved and expanded in the soon-to-be-released v0.3: https://github.com/facebook/prophet/blob/v0.3/notebooks/diagnostics.ipynb)

bletham avatar May 26 '18 01:05 bletham

This feature is now discussed in the documentation at https://facebook.github.io/prophet/docs/multiplicative_seasonality.html

bletham avatar Jun 07 '18 18:06 bletham