L1 and L2 Regularization in Machine Learning: Easy Explanation for Data Science Interviews

preview_player
Показать описание
Regularization is a machine learning technique that introduces a regularization term to the loss function of a model in order to improve the generalization of a model. In this video, I explain both L1 and L2 regularizations, the main differences between the two methods, and leave you with helpful pros and cons so you can best decide when to implement each function.

🟢Get all my free data science interview resources

// Comment
Got any questions? Something to add?
Write a comment below to chat.

// Let's connect on LinkedIn:

====================
Contents of this video:
====================
00:00 Introduction
00:21 Interview Questions
00:41 What is regularization?
01:27 When to use regularization?
01:47 Regularization techniques
03:44 L1 and L2 regularizations
03:55 L1 Regularization
08:03 L2 Regularization
10:50 L1 vs. L2 Regularization
11:47 Outro
Рекомендации по теме
Комментарии
Автор

Thank you for making this video, this helped me understand Regularization

EricLiu-pxmi
Автор

Man, I tried to find videos and blog post about this topic and most of them just scratch the surface. Thanks for the deep analysis and comparison!

MinhNguyen-lzpg
Автор

Much clearer than what I learned from elsewhere. I also noticed that you slowed the pace of speaking which is nice for people to follow

AllieZhao
Автор

Some details who'd like to to get into that really deep: regarding L1 penalty - we can't really choose w2 = 0 and w1 = 1, since loss consists of 2 parts: loss from the diamond shape (l1 penalty) + loss from the ellips shape (initial loss function). since for (w1, w2) pairs (0, 1) and (1, 0) l1-penalty term values are the same and equals 1 + 0 = 0 + 1 = 1, we now look at the initial loss function as it just as well depends on the (w1, w2) values. for w1 = 0 and w2 = 1 (closer to the center point) loss is going to be less than for w1 = 1 and w2 = 0 (farther from the center point) - we can see that from the contour lines plot. therefore, optimizer won't go there and will converge on w1 = 0 and w2 = 1 and that's it.

dimasushko
Автор

thank you so much for this clear explanation. It has helped me more than the Coursera course.

crystalcleargirl
Автор

Great vid! It's like a fast recap of a college stat class.

louisforlibertarian
Автор

Great explanation, Emma! Have a nice day!

HumbertoMoura
Автор

Hello Emma, I started my switching to AI/ML and noticed your website and courses. does your training or courses suitable for beginner? . also am not sure if you you have special coursers for statistics and mathematics for AI/ML .. Thank you

muhannedalogaidi
Автор

How can increasing alpha would decrease the weight can you pls explain. Now 0.1 is bigger than 0.001 if I have weight as 0.4 now 0.1 *0.4= 0.04 where as 0.001 *0.4 would be 0.0004 now lesser the alpha lesser the weight which will be near to zero correct. I feel what you mean by bigger alpha is alpha with bigger negative power isn't that correct. Can you please clarify

cosmicfluke