facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.47k stars 4.53k forks source link

Calculate the delta #1959

Open mrgil123 opened 3 years ago

mrgil123 commented 3 years ago

Good Afternoon Firstly I want to say thank you for creating robust forecasting machine Recently I studied about Prophet I confuse how Prophet calculate the delta (change magnitude) in the past data I have try to read the documentation and source code but I still can't understand

The documentation of Prophet(page Trend Changepoint) says "It then puts a sparse prior on the magnitudes of the rate changes (equivalent to L1 regularization)" Can you show me where do this process happen in the source code? I really need your help

tcuongd commented 3 years ago

Hey, here's a breakdown of how the linear growth trend is implemented:

https://github.com/facebook/prophet/blob/b75844e07c3b09bf3bc383c9d43241c554dd251b/python/stan/unix/prophet.stan#L108-L114

https://github.com/facebook/prophet/blob/b75844e07c3b09bf3bc383c9d43241c554dd251b/python/stan/unix/prophet.stan#L119

https://github.com/facebook/prophet/blob/b75844e07c3b09bf3bc383c9d43241c554dd251b/python/stan/unix/prophet.stan#L127-L142

mrgil123 commented 3 years ago

Thank you so much for the nice answer! Can I ask again,please.. Is prophet get the k,m,delta from estimate the posterior distribution?