unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.87k stars 851 forks source link

Add BayesianRidge and ARDRegression to LinearRegressionModel #1510

Open Beerstabr opened 1 year ago

Beerstabr commented 1 year ago

I really like the option of setting the likelihood to 'quantile' in the LinearRegressionModel.

It's great because it allows you to create probabilistic forecasts using Sklearn's QuantileRegressor which also includes regularization and thus makes for a very powerful forecasting tool.

Sklearn offers a wide range of models and I think some of them could be included into Darts in a similar fashion as QuantileRegressor.

Two models that might be of value are BayesianRidge and ARDRegression. They are great at feature selection and offer probabilistic predictions. And they could be included in the LinearRegressionModel and called in a similar way as QuantileRegressor by simply setting the likelihood to 'bayesian' or 'ard-bayesian'.

If this sounds interesting to you, I'd gladly help out and come up with a pull-request.

hrzn commented 1 year ago

Hi @Beerstabr, this sounds like a great idea to me! I like your proposed approach leveraging LinearRegressionModel. If for some reason it turns out to be not a great fit, we can also consider making new classes (eg. BayesianRidgeModel) inheriting from RegressionModel. But I think your proposed approach should be tried first. I'd be very keen on seeing a PR along those lines!