Basics
Welcome
Say you're building a regression model: it predicts some outcome, like a
café's daily coffee sales, from one or many candidate input features,
like whether it's raining and how many people walk by.
The lasso is a fast, standard way to reduce a haystack of features to
the few needles that make a good predictive model. The elastic net is a
variation of the lasso that tends to share the credit among correlated
features, where the lasso hands it to one.
In this tutorial, we'll learn how the lasso and elastic net “think.” Rather than building them up
from the math, we'll watch how they behave when presented with different datasets: which
features they pick, in what order, and why.
After this "Basics" section, the "Lab" walks you through a series of
experiments that let you see and explore key lasso behaviors. "In the
Wild" shows off some real datasets and ties back to what you've learned
in the Lab. Finally, "Takeaways" wraps up what we've learned. It should
take 15–20 minutes.
Move between cards with the ← and → keys, or the "Next" and "Back" buttons.
Optional refreshers:
- StatQuest, Lasso regression (video)
- James, Witten, Hastie & Tibshirani, An Introduction to Statistical Learning, Chapter 6
- Terence Parr, A visual explanation for regularization