How to do Multiple Linear Regression in Python| Jupyter Notebook|Sklearn

  Рет қаралды 139,417

Megha Narang

Megha Narang

Күн бұрын

Пікірлер: 195
@cowjacketstudiostm5902
@cowjacketstudiostm5902 3 жыл бұрын
Literal queen. Been crying for a week over this. I could've just watched this, this is amazing.
@omarelliottgreen823
@omarelliottgreen823 2 жыл бұрын
After 6 hours of stumbling through StackOverflow and various books, this video made it clear in 20 minutes! Thank you SO MUCH!!!
@b048peyyettipavankartikpra4
@b048peyyettipavankartikpra4 8 ай бұрын
Amazing video! This is my first project ever and I hope to continue further in my career of Data Science!
@mizanalisayed
@mizanalisayed 3 жыл бұрын
Since 2 days i am trying to understand ML. Finally abhi ache se samajh gaya. Thanks
@shahzebmohammad9521
@shahzebmohammad9521 3 жыл бұрын
Simple, Clear, Concise. What else do you want?
@MeghaNarang
@MeghaNarang 3 жыл бұрын
Thank you!
@JewelWildmoon
@JewelWildmoon 2 жыл бұрын
Quick extra note for anyone since I was stuck on it for a bit. If you have any columns you want to exclude beforehand (for me, it kept picking up data with string values too and I wanted to exclude those), run this first for those columns before defining x and y: data_df.drop(['Column1', 'Column2', 'etc..'], axis=1, inplace=True) Using "inplace=True" will make it so those columns will stay out of the dataframe because if you define it as "inplace=False" or don't define it at all, those columns you removed will go back into the dataframe anyway. It wasn't used in defining x and y because we need the column PE to return to the dataframe. And thank you so much for this video miss Megha. I'm new to Python and have been struggling with this for an assignment for hours and this really helped me.
@vikrantyadav7379
@vikrantyadav7379 3 жыл бұрын
This is the best tutorial i have come across ... simple ,easy and beautiful. Please upload other regression and classification problems.
@tammu478
@tammu478 2 жыл бұрын
Beginning my ML journey. Thank you for the crisp explanation.
@JawadAhmadKhan
@JawadAhmadKhan 2 жыл бұрын
one of the best explanations in very simple words... Bravo Miss Megha Narang
@nihinlolakukoyi5987
@nihinlolakukoyi5987 2 жыл бұрын
In wish I can give this video a million likes.... thank you very much.. this video was really helpful.
@SKini18
@SKini18 Ай бұрын
Very nice. Exactly what I was looking for
@special1_28
@special1_28 2 жыл бұрын
Hi Megha, you are a mega tutor indeed. You're more than awesome. Without any gaining, this is the best explanation and best perspective I have come across on youtube regarding ML. You're superb ma'am. I await more of your uploads. Thank you!
@sudarshandev6369
@sudarshandev6369 3 жыл бұрын
Wow really its very easy to understand, Mam your sequence wise explanation is awesome.
@CFDAsmaaHadane
@CFDAsmaaHadane 2 жыл бұрын
Thank you for this very informative tutorial! Please keep uploading
@rabiulmallick8991
@rabiulmallick8991 2 ай бұрын
thank you miss
@wayneemery9276
@wayneemery9276 3 жыл бұрын
Should always perform a check for assumptions of Linear Regression when performing it. Otherwise, it can be dangerous or misleading.
@sixlife.official
@sixlife.official 2 жыл бұрын
Do you have any good material for guiding how to check those assumptions using the exercise presented in the video?
@indointanchannel
@indointanchannel 2 жыл бұрын
Thanks sist, you help me to understand about a long code becomes a short code. It's a smart video.
@mallelasunny
@mallelasunny 3 жыл бұрын
Hi Megha...the explanation is neat and clean...right at the point. Very beautifully explained and the concept is clear. Can you please upload more videos on Logistic Regression, KNN, Random forest, Support Vector machines, Decision tree etc?
@taniacai5245
@taniacai5245 3 жыл бұрын
Hi Megha, thank you so much for the video! It helped me a lot in work. Really appreciate! hope you keep making that
@MeghaNarang
@MeghaNarang 3 жыл бұрын
Thank you
@avinashsiripuram1058
@avinashsiripuram1058 3 жыл бұрын
Great explantion ............ur work must be admired
@samarthchakrawartiblogsand4809
@samarthchakrawartiblogsand4809 2 жыл бұрын
For a beginner this video is a big help!!
@Pimentocompany_
@Pimentocompany_ 2 жыл бұрын
Hello I have this problem how can I solve it? (could not convert string to float: 'rainy')
@yangelena7135
@yangelena7135 2 жыл бұрын
Hi thank you for sharing. But I am wondering how do you get the actual linear regression equation with sklearn
@hanifullah1088
@hanifullah1088 2 жыл бұрын
Very clear and to the point . . . .kindly make similar videos for each topic such as Decision tree classifier etc
@resreng
@resreng 2 жыл бұрын
Thank you so so so much for clearing the concepts.
@ranulmbalasooriya659
@ranulmbalasooriya659 2 жыл бұрын
Thank you so much for the clear explanation.
@syeda8343
@syeda8343 3 жыл бұрын
Mam I got an error ln[8] Could not convert string to float:AT How to fix it? Can anyone tell me?
@bonganindlovundlonu3239
@bonganindlovundlonu3239 2 жыл бұрын
Awesome video. keep on doing great
@lookaway8496
@lookaway8496 2 жыл бұрын
So good! this is much simpler explanation. I love it
@cass1522
@cass1522 2 жыл бұрын
Thank you so much for the video!
@arjunramprasad6752
@arjunramprasad6752 2 жыл бұрын
Amazing tutorial!
@Deepsim
@Deepsim 3 жыл бұрын
I really like your well organized presentation structure!
@NK-vd8xi
@NK-vd8xi 2 жыл бұрын
What keyboard are you using? It sounds so soothing.
@EddyFisico
@EddyFisico Жыл бұрын
This is a very good video! Thank you very much!
@emanuelbyas9819
@emanuelbyas9819 2 жыл бұрын
Thank you so much! Super Clear!
@MeghaNarang
@MeghaNarang 2 жыл бұрын
Glad it helped!
@jiwan-darshan.
@jiwan-darshan. 6 ай бұрын
If we have two outputs in multiple linear regression model. What are the steps ?
@anuarohi2335
@anuarohi2335 9 ай бұрын
Very meaningful session, great explanation 👍
@abdullahateeq1236
@abdullahateeq1236 2 жыл бұрын
Thank you for the visualization.... :)
@ShiftKoncepts
@ShiftKoncepts 8 ай бұрын
Do you have a guide on how to do multiple variables if they are non linear? Meaning we’d have to use a polynomial method with degrees?
@KiratAlreja
@KiratAlreja 3 жыл бұрын
Mam, how do we predict multiple target values (y variables) with a single linear regression model?
@vinayshukla3800
@vinayshukla3800 2 жыл бұрын
GREAT WORK MEM👏👏👏👏👏
@datawithalvin
@datawithalvin 2 жыл бұрын
thank you so much this video help me to understand the concept faster
@MeghaNarang
@MeghaNarang 2 жыл бұрын
Glad to hear that!
@jaydeepraut820
@jaydeepraut820 3 жыл бұрын
Hi, your videos are awesome and easy to understand. Can you please upload the logistic regression, random forest, SVM and times series modeling videos with examples.
@MeghaNarang
@MeghaNarang 3 жыл бұрын
sure, will try to upload something soon
@jaydeepraut820
@jaydeepraut820 3 жыл бұрын
Thank you very much, and please upload with the dataset available on the internet, so that we can try on our own.
@billwindsor4224
@billwindsor4224 3 жыл бұрын
@@jaydeepraut820 did you try to search in Google for the dataset described, as she showed and explained it at the video timestamp @1:10 and following? As she describes this in the video, it is straightforward to search and find from Google.
@Kod.u
@Kod.u 2 жыл бұрын
Really helpful tutorial! Thank you.
@shantanulokhande1792
@shantanulokhande1792 3 жыл бұрын
Thank you so much. It was really helpful!!!
@yusiferzendric1489
@yusiferzendric1489 3 жыл бұрын
I only had difficulty in plotting the model, thanks a lot 😃😃👍👍
@APPRENTINazmi
@APPRENTINazmi 3 жыл бұрын
very nice and easy teaching. Congrats.
@MeghaNarang
@MeghaNarang 3 жыл бұрын
Thanks!
@samahabdalrahim3709
@samahabdalrahim3709 3 жыл бұрын
thanks a lot, please I want to know which algorithm is used (batch, stochastic...?) also can we show the cost function?
@wahu9578
@wahu9578 3 жыл бұрын
@ Megha, thank you for this. Have you done another video of a way to improve the model? If so, can you kindly share the link?
@olanrewajubakare3790
@olanrewajubakare3790 3 жыл бұрын
I really appreciate your work, however, I will like to point something I noticed out. The scatter plot you created for your result at the end of the analysis where you had the y_test plotted against the y_pred seems inaccurate to me. plt.scatter(y_test, y_pred) is supposed to indicate that your y_test is on the x-axis while your y_pred. is to be plotted on the y-axis. I believe what you should do is showcase the y_test and y_pred on the y-axis while you use a common x-axis for the two on the same plot.
@christopherwright361
@christopherwright361 2 жыл бұрын
Two different ways of showing the same basic thing. y_pred vs. y_test will form a 45-degree straight line if the data is perfectly predicted, whereas y_test and y_pred both vs. x_test will show the points overlapping each other, if perfectly predicted. However, because this is multiple regression, there isn't a single x variable, so you would have several of the latter plots. These are useful for certain diagnostics. However, a very common first plot is y_test vs. y_pred. Plotting residuals vs. y_test or x_test (one at a time) are also common charts to make.
@ashiskar9531
@ashiskar9531 3 жыл бұрын
Hi megha why did not you scaled the dataset.
@waqasrana7891
@waqasrana7891 3 жыл бұрын
Hi Megha, thanks for tutorial. what if we have string in datasets (like types can be multiple strings not boolean e.g colors:blue, red, green ,black ) how we will convert it into float format cuz model only understands numbers.
@symonhalder391
@symonhalder391 2 жыл бұрын
Error showing after fit model. Showing could not convert string to float.
@DVijebahu
@DVijebahu 3 жыл бұрын
Clear and Nice explanation....
@MeghaNarang
@MeghaNarang 3 жыл бұрын
Thank you
@akshayjadhav2003
@akshayjadhav2003 Жыл бұрын
After define x & y print statement should be came in " str " how it is possible if all dataset and format as it is copy .🤔
@sadhanabarman3178
@sadhanabarman3178 Жыл бұрын
Ma'am can we get regression for more than 2 independent variables w.r.t more than two dependent variable??
@owonubijobsunday4764
@owonubijobsunday4764 Жыл бұрын
I liked the video, so I "Liked" and I "Subscribed" Thanks, MN
@ca2hill
@ca2hill 2 жыл бұрын
So useful!!! Thank You
@greenfootprint2680
@greenfootprint2680 Жыл бұрын
Great breakdown! Liked and Sub 👌
@toluwasedaniel7064
@toluwasedaniel7064 9 ай бұрын
Hello!! I keep getting this popped up message anytime i tried to import the data. Please help! "The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again"
@mansoorahmed4150
@mansoorahmed4150 3 жыл бұрын
could you please tell more, using multiple regression which technique you follow? I mean OLS or else?
@prachijain3736
@prachijain3736 3 жыл бұрын
could not convert string to float: 'Next Look' Getting this error, How can I resolve it.
@tahirakhurshidali1506
@tahirakhurshidali1506 2 жыл бұрын
Hi i am findinf error in importing excel file, "SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \UXXXXXXXX escape" Can you please help me to know how to resolve it?
@saeedewu129
@saeedewu129 Жыл бұрын
how to find the beta coefficients and the constant value
@prabirdas8430
@prabirdas8430 3 жыл бұрын
Nice explanation 👍🏻
@MeghaNarang
@MeghaNarang 3 жыл бұрын
Thank you!
@myandrobox3427
@myandrobox3427 2 жыл бұрын
Excellent💯👍
@060584saurav
@060584saurav 3 жыл бұрын
How can we see the equation of the model
@pinkysaikiadutta9752
@pinkysaikiadutta9752 3 жыл бұрын
Very nice explanation. Thanks!! for the explanation
@humphreymorara7818
@humphreymorara7818 3 жыл бұрын
At 13:20 under predict Is it supposed to be y_pred =...... x_test or y_pred =...... y_test since you are predicting y not x
@dianahnyamweya1393
@dianahnyamweya1393 3 жыл бұрын
What happens if one of the variables has string values instead of numerical values?
@meditation_central299
@meditation_central299 3 жыл бұрын
Hi ,What kind of MLR is this ?
@lentskababe
@lentskababe 3 жыл бұрын
hi what can i put when i need to drop 2 variables
@chandrashakhar1800
@chandrashakhar1800 3 жыл бұрын
Could you please make a video on this topic from scratch without using the sklearn library to better understand the mathematics behind it or provide a useful link? Please...
@billwindsor4224
@billwindsor4224 3 жыл бұрын
@Chandra Shakhar start with the website she shows in her discussion of sklearn: scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html , which leads you to the technical explanation at: scikit-learn.org/stable/modules/cross_validation.html#cross-validation
@norahassan3407
@norahassan3407 2 жыл бұрын
very insightful many thanks for your impressive work
@roshukhanal4737
@roshukhanal4737 Жыл бұрын
How to do the path for first part? where to storedata
@minhngo3162
@minhngo3162 Жыл бұрын
Hi Megha, thanks for showing steps by steps. I have a question. Instead plotting the result by "Actual" and "Predicted", can we visualize the predicted vs. actual ''y" for each variable"x"? Can you please advise the codes? Thank you.
@ayoajayi280
@ayoajayi280 11 ай бұрын
Hello Megha. Great video. But you did apply the scaler function to standardize the days. Why?
@ikennanwankpa6354
@ikennanwankpa6354 Жыл бұрын
Thanks for the video. I built a model to predict rent across my country. The accuracy score is 43% or so. What can I do to improve it? I can send the script of needed. Thanks.
@srikanthgiri2781
@srikanthgiri2781 2 жыл бұрын
hi , Thanks for this amazing video! If we need to print the linear regression equation in the form of y= a+bx1+cx2 , how to do that?
@googm
@googm 2 жыл бұрын
Do `dir(ml)` and you will see a list of attributes. You'll find what you're looking for in ml.coefs_ and ml.intercept_.
@renato.aravena4051
@renato.aravena4051 3 жыл бұрын
Cleannn tutorial, the best of all, thx :))
@girishchhonkar9391
@girishchhonkar9391 3 жыл бұрын
Great explanation mam...just simple and smooth 😃..keep uploading videos
@alyaaazlan7794
@alyaaazlan7794 Жыл бұрын
This is sooooo Great!!!
@pursuingperfectionn
@pursuingperfectionn 2 жыл бұрын
Simply Brilliant !!
@akeisaac7278
@akeisaac7278 2 жыл бұрын
I keep getting a value error , could not convert string to float :’AT’
@vvarsani2618
@vvarsani2618 3 жыл бұрын
Error: name 'y _test'is not defined What should i do??
@sreekanthreddy7452
@sreekanthreddy7452 3 жыл бұрын
Keep it up and make videos on other models too mam.
@motuagrakalam7749
@motuagrakalam7749 3 жыл бұрын
Really nice explanation. One question, in the final regression equation can we have 0 as coefficient for any independent variable or all variables will be assigned some non 0 values?
@souptikdasgupta2062
@souptikdasgupta2062 3 жыл бұрын
It should always have a non zero value because if it is zero it would mean that the specific independent variable is totally useless to predict the dependent variable, which never is the case.
@christopherwright361
@christopherwright361 2 жыл бұрын
Because you're estimating from a sample, it would be nearly impossible for a variable to have a coefficient of 0, even if there isn't any correlation between the dependent variable and the independent variable (within the context of your model) in the real process. If you ever get a zero coefficient, it's likely due to an error such as including a redundant feature, having perfect (multi)collinearity, including k dummy variables (and an intercept) for k cases, etc. This can be fixed by reducing the feature set (one at a time, of course.)
@azizinaim8470
@azizinaim8470 3 жыл бұрын
hi, can i ask, why my df not defined , do i need to do anything before put the coding as you..im a beginner, would be great if you can reply this :)
@shakirullah5840
@shakirullah5840 3 жыл бұрын
Very nice video. Thank you so much and Best of luck--Shakir, Bangladesh
@dhaneshsarpale1718
@dhaneshsarpale1718 3 жыл бұрын
simple explanation... Thank you mam
@MeghaNarang
@MeghaNarang 3 жыл бұрын
Thanks @Dhanesh
@jongcheulkim7284
@jongcheulkim7284 3 жыл бұрын
Thank you so much. This is very helpful.
@gaurizade7560
@gaurizade7560 2 жыл бұрын
Why you did not check if multicolinearity present or not ?
@sunandadebnath96
@sunandadebnath96 2 жыл бұрын
you are life saver
@danielstafford6858
@danielstafford6858 3 жыл бұрын
brilliant video
@lekhrajmalviya4927
@lekhrajmalviya4927 Жыл бұрын
Very nice explaination. Could you please tell how we can get equation for the predicted model?
@shashibhushan715
@shashibhushan715 2 жыл бұрын
how to perform regression for the following equation: time= ( pressure)^a + (concentration of fuel)^b + (concentration of oxidizer)^c + exp(d/Temperature). Here, time is dependent variable on pressure, concentration of fuel, concentration of oxidizer and temperature. How to set non-linear model like the above equation
@atoffice7323
@atoffice7323 3 жыл бұрын
very nice presentation..
@MuhammadAswadking
@MuhammadAswadking 2 жыл бұрын
Dear Megha, I am from Pakistan,I have followed your code,but I am getting this error while plotting. ""x and y must be the same size""" would you please explain Thanks in advance.
@SanaShaikh-sm7kz
@SanaShaikh-sm7kz 3 жыл бұрын
Thanks a lot..this video has helped me a lot in my project❤❤❤❤
@MeghaNarang
@MeghaNarang 3 жыл бұрын
Glad I could help :)
@tarunkumargola7633
@tarunkumargola7633 3 жыл бұрын
Finding the parameter at which cost function gives minimum value(gradient descent) is done by scikitlearn?
@MeghaNarang
@MeghaNarang 3 жыл бұрын
towardsdatascience.com/minimizing-the-cost-function-gradient-descent-a5dd6b5350e1
Linear Regression in Python - Full Project for Beginners
50:52
Alejandro AO - Software & Ai
Рет қаралды 36 М.
Multiple Linear Regression using python and sklearn
19:51
Krish Naik
Рет қаралды 153 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 54 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 12 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 29 МЛН
Mastering Multiple Linear Regression in Scikit-Learn: A Step-by-Step Guide
25:58
Ryan & Matt Data Science
Рет қаралды 9 М.
Multiple Linear Regression using python ( Regression Analysis )
16:23
Machine Learning With me
Рет қаралды 10 М.
Learn Statistical Regression in 40 mins! My best video ever. Legit.
40:25
Regression Analysis | Full Course
45:17
DATAtab
Рет қаралды 858 М.
Polynomial Regression in Python - sklearn
14:01
RegenerativeToday
Рет қаралды 11 М.
Data science in Python: pandas, seaborn, scikit-learn
34:30
Data School
Рет қаралды 187 М.
Statistics 101: Multiple Linear Regression, The Very Basics 📈
20:26
Brandon Foltz
Рет қаралды 1,3 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 54 МЛН