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.41k stars 4.53k forks source link

Regularization (Lasso and Ridge) for Prophet with Regressors #2429

Open KathyGCY opened 1 year ago

KathyGCY commented 1 year ago

Dear Prophet Developers, How are you today? I was wondering if there's a way to add regularization for Prophet model with regressors? Thank you!

Aman123lug commented 1 year ago

@KathyGCY I want to work on this issue but i am low familiar with the Prophet model can you please provide some that i can understand in a better way

KathyGCY commented 1 year ago

@Aman123lug Yes. In a traditional regression y = b0 + b1 x1 + b2 x2 ... We find (b0, b1, b2 ...) that minimizes the mean squared error (MSE). It may result in overfitting. So regularization is adding a penalty term to the mean squared error. Penalty type 1, (Lasso): MSE + lambda sum(ABS(b0), ABS(b1), ABS(b2) ...) Penalty type 2, (Ridge): MSE + lambda sum(b0^2, b1^2, b2^2 ...) Similarly in prophet when we add external regressors. Is there a way to add the penalty terms when we fit regressor coef?