How does the penalty hyperparameter lambda relate to the variance of the Bayesian prior?
Last updated
λ is inversely proportional to prior variance. With prior
w ~ N(0, τ²I)and noise variance σ², the MAP estimate is ridge withλ = σ²/τ².A flat prior (τ² → ∞) gives λ → 0 and recovers OLS. A tight prior forces weights to 0. For a Laplace prior with scale b,
λ = 2σ²/b.The constant depends on loss convention (mean vs sum divides by n) and feature scaling. τ² can be estimated by empirical Bayes (e.g.
BayesianRidge).
- https://machinelearningplus.com/statistics/ridge-regression-as-map-estimation-supporting-notes/
- https://mcpanalytics.ai/articles/bayesian-regularization-practical-guide-for-data-driven-decisions
- https://medium.com/@tylergenegross97/two-approaches-to-regularized-linear-regression-the-frequentist-approach-ridge-and-lasso-b681348f86a9