© 2026 Greg T. Chism · MIT License

L1 & L2 Regularization — Interactive Explorer

Explore how regularization strength shapes weight distributions, sparsity, and decision boundaries


Regularization Type
no penalty — weights unconstrained
Regularization Strength λ
λ 0.010
very weak — nearly unregularized
Network Complexity
few weights — minimal overfitting risk
Simulation
Penalty Term
What's happening?
Select a regularization type and press Train to begin.
Epoch 0
Loss
‖w‖
Weight magnitudes — sorted by |wᵢ|
Visualization loads after Stage 2
No Reg L1 weights L2 weights
Weight Histogram
Histogram
Weight Statistics
Non-zero
Zeros (≈0)
Max |w|
Mean |w|
Sparsity 0%