Save this video free

Lecture 4b

Prof. Schniter · 59:18 · Watch on YouTube

Lecture 4b Watch on YouTube →

Overview

The lecture develops regularization for feature selection, contrasting ridge regression's L2 penalty, which stabilizes estimates when features are correlated, with lasso's L1 penalty, which sets some coefficients exactly to zero. It also explains training-only standardization, cross-validation for choosing regularization strength, and how to combine lasso feature selection with least squares in scikit-learn to reduce coefficient bias without leaking validation data.

Key takeaways

Chapters

0:00 Feature Selection Motivation and Regularization
5:00 Standardize Features Before Applying Penalties
13:00 Apply Training Statistics to Test Data
17:00 Ridge and Lasso Objectives in Norm Form
23:00 Ridge Regression's Closed-Form Solution
27:00 Ridge Coefficient Paths and Correlated Features
34:00 Use Cross-Validation to Tune Ridge Regression
40:00 Lasso Paths Select Features but Shrink Estimates
45:00 Debias Lasso with Least Squares on Selected Features
51:00 Cross-Validate Lasso with GridSearchCV
56:00 Tune the Debiased Lasso Pipeline Without Data Leakage

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:01 Welcome back everyone. So let's uh get started. Um last time we were talking about feature selection. So the [clears throat] idea there is that you select some subset of your D possible features. Uh the motivation is that if you use all your features um there may be too many of them. Some of them may not be very useful and so you'll see a large error variance. um we would like to use fewer than all of them but it's not clear which of them to use. If you leave out the wrong features um your model will have a high bearing uh bias. So the question is exactly which one should we be using? And um

0:49 [clears throat] we could use cross validation to go through every one of the possible subsets of features and find which one is best according to our our test error. But the problem is that um there's two to the power d of them. And so when d is um more than a small number this becomes captationally impossible. So [clears throat] typically people focus on suboptimal methods that are a lot cheaper than exponential and d complexity although they may not work quite as well. So uh one that we talked about is stepwise selection. We also talked about feature ranking based on some statistics that correlate features and target

1:37 individually. And [clears throat] then we just started to talk about regularizationbased methods and we'll continue that discussion today. So let's go to okay for the regularizationbased methods um [clears throat] the idea is to um okay so previously when we did this back in unit 2 uh when we designed our beta coefficients we chose them to minimize residual sum of squares which we know is defined this way um and that was [clears throat] a

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Prof. Schniter.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.