Machine Learning Tutorial Python - 17: L1 and L2 Regularization | Lasso, Ridge Regression

Machine Learning Tutorial Python - 17: L1 and L2 Regularization | Lasso, Ridge Regression

codebasics

3 года назад

256,706 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@marthanyarkoa9007
@marthanyarkoa9007 - 15.11.2023 18:54

Thanks so simple ❤😊

Ответить
@hopelesssuprem1867
@hopelesssuprem1867 - 11.11.2023 19:07

That guy doesn't know what regularization is. That thing u've called overfittng maybe solved with degree reduction and this is not overfitting. For linear regression u may see overfitting in data with a big number of fuatures and relatively small number of samples. Exactly here we need to use l1/l2/elastic regularization but and in this case we may apply PCA and problem will solved without l1/l2/lasso.
Learn ml, noob)

Ответить
@user-nf3si6gw2n
@user-nf3si6gw2n - 31.10.2023 21:09

Nice explanation .. Adding to that
L2 Ridge : Goal is to prevent multicollinearity and control magnitude of the coefficients
where highly corelated features can be removed by shirking the coefficients towards to zero not exactly zero , stability and generalization.
L1 Lasso : Goal is to prevent sparsity in the model by shirking the coefficients exactly to zero , importance in feature selection, preventing overfitting..

Ответить
@kibesamuel697
@kibesamuel697 - 16.10.2023 15:25

The best of two worlds wow!

Ответить
@surbhigulati9350
@surbhigulati9350 - 17.07.2023 12:09

Hello Sir
why did you noy fill the distance parameter with mean value?

Ответить
@gyanaranjanbal10
@gyanaranjanbal10 - 13.07.2023 00:33

Clean, crisp and crystal clear, I was struggling to understand this from a long time, your 20 mins video cleared it in one attempt, thanks a lot💌💌

Ответить
@SohamPaul-xy9jw
@SohamPaul-xy9jw - 02.07.2023 17:43

When I am creating dummies, it is showing that the Suburb column is of type NoneType() and no dummies are getting created. What can be the problem?

Ответить
@phuonglethithanh8498
@phuonglethithanh8498 - 16.06.2023 17:55

Thank you for this video. Very straightforward and comprehensive ❤

Ответить
@035-harshitsingh7
@035-harshitsingh7 - 23.05.2023 14:35

sir can you provide ppt and jupyter notebook link of above used resources?

Ответить
@vyduong276
@vyduong276 - 08.05.2023 23:26

I can understand it now, thanks to you 🥳

Ответить
@armghan2312
@armghan2312 - 29.04.2023 01:09

is there any algorithm using which we can determine the unimportant features in our datasets?

Ответить
@nikhilsingh1296
@nikhilsingh1296 - 24.03.2023 08:47

I really love learning from your Videos, they are pretty awesome.

Just a concern, as in Line 11 we ran a missing value sum code where the Price Stated, 7610 and in the next line that is Line 12, we have dropped the 7610 rows, isn't it?

Also, what was the other option if we would not have dropped the valued, can we not divide the data set and treat 50 percent of the missing values in Price and as a train dataset by imputing mean, and run the test on the missing price values.

I am not sure, even if this is a valid question, but I am a bit curious.

Also, what was the scope for PCA here?

Ответить
@tejas4054
@tejas4054 - 27.02.2023 16:47

How do you already know that it will overfit,,, thag means we have to check on every algorithm that score compulsory,,, where i learn ml they never told this ,,,

Ответить
@nationhlohlomi9333
@nationhlohlomi9333 - 22.02.2023 15:17

I really love your content….. You change lives❤❤❤

Ответить
@swL1941
@swL1941 - 21.02.2023 12:22

Great video.
However, It would have been better if you had provided the justification for assigning Zeros to few NaN values and giving mean to frew records. I know "its safest to assume" butt hen I believe in real world projects we cannot just assume things.

Ответить
@flatisearth
@flatisearth - 09.02.2023 20:48

To me filling the "BuildingArea" feature with the mean when around 2/3 of your data points have NaN sounds like a bad idea. On the contrary you dropped the "Regionname" while only three data points have NaN values. I'd drop the 3 corresponding data points instead and keep the feature "Regionname", which is one of the most important features in determining the price of a house.

Ответить
@JAVIERHERNANDEZ-wp6qj
@JAVIERHERNANDEZ-wp6qj - 03.02.2023 19:09

Maybe in the Cost formula, the indices for summation should be different (in general): for the MSE term the sum should be over the entire training dataset (in this case n), and the sum for the regularization term should run over the number of features or columns in the dataset

Ответить
@sridharbajpai420
@sridharbajpai420 - 22.12.2022 15:29

ho to ccomputer gradient of L1 reg its not even differentiable

Ответить
@ahmedsouissi8774
@ahmedsouissi8774 - 20.12.2022 00:45

Hello,
can you put the link of github?
Thank you

Ответить
@chvenkatesh6642
@chvenkatesh6642 - 05.12.2022 20:15

Hi bro I tried all the possible ways to get the data but I cannot and even tutorial.

Ответить
@javinashjoshi5249
@javinashjoshi5249 - 08.11.2022 16:25

Thankyou very much sir

Ответить
@phamnhatanh4485
@phamnhatanh4485 - 01.11.2022 06:35

Sir, i can't find link Belbourne_housing csv .

Ответить
@jongcheulkim7284
@jongcheulkim7284 - 11.09.2022 16:45

Thank you. This is very helpful.

Ответить
@kaizen52071
@kaizen52071 - 11.09.2022 14:29

Nice video....good lesson......funny enough i see my house address in the dataset

Ответить
@MrCentrax
@MrCentrax - 10.08.2022 23:43

So are l1 and l2 polynomial regression models?

Ответить
@MrMadmaggot
@MrMadmaggot - 10.08.2022 06:00

First when you apply lasso, you apply it apart from the first linear regression model you made right?
Which means applying scikit Lasso is like making a linear regression but with regularization or it is applied to the linear regresion from the cell above??

So what if I use a knn or a forest?

Ответить
@adia9791
@adia9791 - 01.08.2022 08:50

I think one must not use those imputations(mean) before train test split as it leads to data leakage, correct me if I am wrong.

Ответить
@leonardomenar55
@leonardomenar55 - 13.07.2022 20:14

Excellent Tutorial, Thanks.

Ответить
@rithikas5849
@rithikas5849 - 07.07.2022 08:39

Can you please provide the jupyter notebook link for this piece of code sir?

Ответить
@sagarvarandekar8279
@sagarvarandekar8279 - 29.06.2022 15:51

My lasso regression is getting wrong results. It is giving all coefficients as zero except the constant and R2 score as --0.001825328970232576. Someone please help.

Ответить
@gouravsapra8668
@gouravsapra8668 - 21.06.2022 12:52

Hi...The equation, shouldn't it be : Theta0 + Theta1.x1 + Theta2.square (x1)+Theta3.cube (x1) rather than Theta0 + Theta1.x1 + Theta2.square (x2)+Theta3.cube (x3) because we have only one x feature ?

2) the Regularization expression (Lambda part), my understanding is that we should not take "i & n" , rather we should take "j & m" etc. The reason is that in first half of equation, we took "i & n" for number of rows whereas in second half, we need to take number of features, so different parameters should be used.

Please correct me if my understanding is wrong.

Ответить
@junaidlatif2881
@junaidlatif2881 - 21.06.2022 00:36

Amazing. But how to select best alpha value?

Ответить
@aadityashukla8535
@aadityashukla8535 - 18.06.2022 07:00

good theory!

Ответить
@tanishsadhwani730
@tanishsadhwani730 - 10.06.2022 15:31

Amazing sir thank you so much

Ответить
@RadioactiveChutney
@RadioactiveChutney - 30.04.2022 09:53

Note for myself: This is the guy... his videos can clear doubts with codes.

Ответить
@alizhuban6227
@alizhuban6227 - 07.04.2022 22:32

cool

Ответить
@nikolinastojanovska
@nikolinastojanovska - 05.04.2022 06:40

great video, thanks!

Ответить
@anvarshathik784
@anvarshathik784 - 24.03.2022 17:47

could you plz share the code and data set ?

Ответить
@anvarshathik784
@anvarshathik784 - 24.03.2022 17:46

achine learning concepts and practicals made easy, Thank you so much Sir

Ответить
@nehareddy4619
@nehareddy4619 - 20.03.2022 17:25

I really liked your way of explanation sir

Ответить
@ayenewyihune9213
@ayenewyihune9213 - 17.03.2022 11:43

Cool video

Ответить
@arjunbali2079
@arjunbali2079 - 09.03.2022 21:57

thanks sir

Ответить
@bhoomi5398
@bhoomi5398 - 25.02.2022 14:12

what is dual parameter and please explain what is primal formal & dual

Ответить
@unifarzor7237
@unifarzor7237 - 31.01.2022 12:22

Always excellent lessons, thank you

Ответить
@javiermarchenahurtado7013
@javiermarchenahurtado7013 - 30.01.2022 06:35

Such a great video!! I was struggling to understand regularization and now it's crystal clear to me!

Ответить
@furkansalman7108
@furkansalman7108 - 27.01.2022 17:06

I tried Linear Regression on the same dataset but it scored the same with Ridge and Lasso why?

Ответить
@mohammadrasheed9247
@mohammadrasheed9247 - 26.01.2022 15:55

Nice Explanation. Also Recommended to play on 2X

Ответить
@Ultimate69664
@Ultimate69664 - 23.01.2022 15:46

thank you ! this video save my exam :)

Ответить