difficulty 4/5
Bayesian linear regression
Linear regression that returns a distribution over coefficients rather than single values — so every prediction carries an honest uncertainty, and the regularization strength is learned, not tuned.
Intuition
Ordinary least squares returns one number per coefficient and says nothing about how sure it is. Fit it to eight noisy points and it reports its slope with exactly the same confidence as if it had eight thousand.
Bayesian linear regression refuses that. It starts from a prior belief about the coefficients, updates it with the data, and returns a distribution — a centre and a spread. Few data points give a wide spread; plenty of data narrows it. The model's uncertainty is now part of its output rather than a footnote [2, §5.6].
Formal definition
How it works
Where it's used
Why & when
Worked example
Pitfalls
Check yourself
3 questions
The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.
On the cheat sheet: Linear models →
Sources
- scikit-learn — sklearn.linear_model.BayesianRidgedocs · retrieved 2026-08-31https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.BayesianRidge.html
- Deep Learning (2016)book · retrieved 2026-10-07https://www.deeplearningbook.org/