You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
linear_model.BayesianLinearRegression maintains a full Gaussian posterior over the weights, which gives calibrated predictive uncertainty (predict_one(..., with_dist=True)) and makes it a natural fit for downstream uses like bandit.LinUCB. There is no classification counterpart yet.
A streaming Bayesian logistic regression would provide the same benefits for binary classification: a posterior over the weights, well-calibrated probabilities, and uncertainty estimates usable for Thompson-sampling / UCB-style bandits.
Approach
The logistic likelihood is non-Gaussian, so there's no exact conjugate update. The usual streaming options:
Laplace approximation / Online Newton — maintain a Gaussian posterior, update mean + precision per observation using the gradient and Hessian of the log-likelihood (cf. the approach behind linear_model.AdPredictor, which already keeps a Gaussian belief per weight via probit ADF).
Assumed-density filtering (ADF) — moment-match after each observation (this is essentially what AdPredictor does for the probit link).
Variational updates (e.g. Jaakkola–Jordan bound) for a logit link.
Worth surveying how this relates to the existing AdPredictor (probit, diagonal covariance) before deciding on the link function and covariance structure (diagonal vs full).
Notes
Should implement Classifier/MiniBatchClassifier and expose calibrated predict_proba_one, ideally with access to predictive uncertainty.
Reuse the NumPy-backed state + Sherman-Morrison machinery from the recently reworked BayesianLinearRegression where applicable.
Motivation
linear_model.BayesianLinearRegressionmaintains a full Gaussian posterior over the weights, which gives calibrated predictive uncertainty (predict_one(..., with_dist=True)) and makes it a natural fit for downstream uses likebandit.LinUCB. There is no classification counterpart yet.A streaming Bayesian logistic regression would provide the same benefits for binary classification: a posterior over the weights, well-calibrated probabilities, and uncertainty estimates usable for Thompson-sampling / UCB-style bandits.
Approach
The logistic likelihood is non-Gaussian, so there's no exact conjugate update. The usual streaming options:
linear_model.AdPredictor, which already keeps a Gaussian belief per weight via probit ADF).AdPredictordoes for the probit link).Worth surveying how this relates to the existing
AdPredictor(probit, diagonal covariance) before deciding on the link function and covariance structure (diagonal vs full).Notes
Classifier/MiniBatchClassifierand expose calibratedpredict_proba_one, ideally with access to predictive uncertainty.BayesianLinearRegressionwhere applicable.BayesianLinearRegressionlearn_manywork in Add learn_many to BayesianLinearRegression #1916.