Principle:Scikit learn Scikit learn Bayesian Regression
| Knowledge Sources | |
|---|---|
| Domains | Supervised Learning, Bayesian Inference |
| Last Updated | 2026-02-08 15:00 GMT |
Overview
Bayesian regression formulates linear regression within a probabilistic framework, placing prior distributions on model parameters and computing posterior distributions conditioned on observed data.
Description
Bayesian regression treats model parameters as random variables rather than fixed unknowns, incorporating prior beliefs about their distributions before observing data. The posterior distribution over parameters provides not only point estimates but also measures of uncertainty in predictions. This framework naturally handles regularization (priors act as regularizers) and provides principled uncertainty quantification. Bayesian regression sits within the broader family of probabilistic machine learning methods and is particularly valuable when uncertainty estimates are as important as the predictions themselves.
Usage
Use Bayesian regression when you need uncertainty estimates on predictions, when prior knowledge about parameter values is available, or when automatic regularization strength selection is desired. Bayesian Ridge regression is appropriate as a probabilistic alternative to Ridge regression, automatically tuning the regularization strength via evidence maximization. ARD (Automatic Relevance Determination) regression is preferred when many features are expected to be irrelevant, as it learns per-feature precision parameters that effectively prune irrelevant features, producing sparse solutions analogous to Lasso but within a Bayesian framework.
Theoretical Basis
Bayesian Linear Regression assumes the following generative model:
A conjugate prior is placed on the weights: .
The posterior distribution over weights is:
where:
Bayesian Ridge estimates the hyperparameters (weight precision) and (noise precision) by maximizing the marginal likelihood (evidence):
This integral is tractable in closed form for Gaussian priors and likelihoods. The hyperparameters are iteratively updated using the evidence framework (type-II maximum likelihood).
ARD Regression (Automatic Relevance Determination) generalizes Bayesian Ridge by assigning a separate precision parameter to each weight:
During optimization, many values diverge to infinity, driving the corresponding weights to zero. This produces a sparse model where only relevant features retain non-zero coefficients. The sparsity mechanism is sometimes called sparse Bayesian learning or the relevance vector machine framework.