ml

Regularization Calculator

L1 Lasso, L2 Ridge, and Elastic Net — coefficient shrinkage table, sparsity count, coefficient path SVG, and penalty geometry diagram.

Coefficients
Regularization Type
λ (log scale)
0.001λ = 1.00100
Coefficient Path (λ from 0.001 to 100)
Penalty Geometry
Regularization Summary
n coefficients6
λ1
Coefficients → 0 (sparsity)2 / 6 (33.3%)
L1 penalty9.4
L2 penalty20.88
Coefficient Table
#βᵢβ̂ᵢΔ%
12.51.5-40%
2-1.8-0.855.6%
30.30-100%
43.12.1-32.3%
5-0.50100%
61.20.2-83.3%
L2: β̂ = β/(1+λ)  ·  L1: β̂ = sign(β)·max(|β|−λ,0)
EN: first L1-shrink(αλ), then L2-shrink((1-α)λ)