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

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 194

  • @cowjacketstudiostm5902
    @cowjacketstudiostm5902 3 ปีที่แล้ว +21

    Literal queen. Been crying for a week over this. I could've just watched this, this is amazing.

  • @omarelliottgreen823
    @omarelliottgreen823 2 ปีที่แล้ว +18

    After 6 hours of stumbling through StackOverflow and various books, this video made it clear in 20 minutes!
    Thank you SO MUCH!!!

  • @b048peyyettipavankartikpra4
    @b048peyyettipavankartikpra4 6 หลายเดือนก่อน +1

    Amazing video! This is my first project ever and I hope to continue further in my career of Data Science!

  • @mizanalisayed
    @mizanalisayed 3 ปีที่แล้ว +3

    Since 2 days i am trying to understand ML. Finally abhi ache se samajh gaya. Thanks

  • @JewelWildmoon
    @JewelWildmoon 2 ปีที่แล้ว +10

    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.

  • @tammu478
    @tammu478 2 ปีที่แล้ว +1

    Beginning my ML journey. Thank you for the crisp explanation.

  • @vikrantyadav7379
    @vikrantyadav7379 3 ปีที่แล้ว +9

    This is the best tutorial i have come across ... simple ,easy and beautiful.
    Please upload other regression and classification problems.

  • @shahzebmohammad9521
    @shahzebmohammad9521 3 ปีที่แล้ว +9

    Simple, Clear, Concise. What else do you want?

  • @JawadAhmadKhan
    @JawadAhmadKhan 2 ปีที่แล้ว

    one of the best explanations in very simple words... Bravo Miss Megha Narang

  • @mallelasunny
    @mallelasunny 2 ปีที่แล้ว +8

    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?

  • @nihinlolakukoyi5987
    @nihinlolakukoyi5987 2 ปีที่แล้ว

    In wish I can give this video a million likes.... thank you very much.. this video was really helpful.

  • @indointanchannel
    @indointanchannel ปีที่แล้ว

    Thanks sist, you help me to understand about a long code becomes a short code. It's a smart video.

  • @NK-vd8xi
    @NK-vd8xi 2 ปีที่แล้ว

    What keyboard are you using? It sounds so soothing.

  • @CFDAsmaaHadane
    @CFDAsmaaHadane 2 ปีที่แล้ว +1

    Thank you for this very informative tutorial! Please keep uploading

  • @cass1522
    @cass1522 2 ปีที่แล้ว +1

    Thank you so much for the video!

  • @abdullahateeq1236
    @abdullahateeq1236 2 ปีที่แล้ว +1

    Thank you for the visualization.... :)

  • @sudarshandev6369
    @sudarshandev6369 3 ปีที่แล้ว +1

    Wow really its very easy to understand, Mam your sequence wise explanation is awesome.

  • @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!

  • @yusiferzendric1489
    @yusiferzendric1489 3 ปีที่แล้ว +1

    I only had difficulty in plotting the model, thanks a lot 😃😃👍👍

  • @ayoajayi280
    @ayoajayi280 9 หลายเดือนก่อน

    Hello Megha. Great video. But you did apply the scaler function to standardize the days. Why?

  • @anuarohi2335
    @anuarohi2335 7 หลายเดือนก่อน

    Very meaningful session, great explanation 👍

  • @samarthchakrawartiblogsand4809
    @samarthchakrawartiblogsand4809 2 ปีที่แล้ว

    For a beginner this video is a big help!!

  • @taniacai5245
    @taniacai5245 3 ปีที่แล้ว +1

    Hi Megha, thank you so much for the video! It helped me a lot in work.
    Really appreciate! hope you keep making that

  • @ranulmbalasooriya659
    @ranulmbalasooriya659 2 ปีที่แล้ว +1

    Thank you so much for the clear explanation.

  • @hanifullah1088
    @hanifullah1088 2 ปีที่แล้ว +1

    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.

  • @jaydeepraut820
    @jaydeepraut820 3 ปีที่แล้ว +7

    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 ปีที่แล้ว +2

      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 2 ปีที่แล้ว

      @@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.

  • @datawithalvin
    @datawithalvin 2 ปีที่แล้ว +1

    thank you so much this video help me to understand the concept faster

  • @ShiftKoncepts
    @ShiftKoncepts 6 หลายเดือนก่อน

    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?

  • @alyaaazlan7794
    @alyaaazlan7794 ปีที่แล้ว +1

    This is sooooo Great!!!

  • @vinayshukla3800
    @vinayshukla3800 2 ปีที่แล้ว +1

    GREAT WORK MEM👏👏👏👏👏

  • @sunandadebnath96
    @sunandadebnath96 2 ปีที่แล้ว +1

    you are life saver

  • @EddyFisico
    @EddyFisico 10 หลายเดือนก่อน

    This is a very good video! Thank you very much!

  • @emanuelbyas9819
    @emanuelbyas9819 2 ปีที่แล้ว +1

    Thank you so much! Super Clear!

  • @bonganindlovundlonu3239
    @bonganindlovundlonu3239 2 ปีที่แล้ว +1

    Awesome video. keep on doing great

  • @olanrewajubakare3790
    @olanrewajubakare3790 3 ปีที่แล้ว +4

    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 ปีที่แล้ว +1

      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.

  • @abdikadirabdi6107
    @abdikadirabdi6107 8 หลายเดือนก่อน

    Thank you for your nice explanation, can you upload more videos other modelling, please? thanks you mam

  • @rabiulmallick8991
    @rabiulmallick8991 16 วันที่ผ่านมา +1

    thank you miss

  • @avinashsiripuram1058
    @avinashsiripuram1058 3 ปีที่แล้ว

    Great explantion ............ur work must be admired

  • @laxmanbisht2638
    @laxmanbisht2638 2 ปีที่แล้ว

    Nicely explained. Here, the difference is actually residual, right?

  • @ca2hill
    @ca2hill 2 ปีที่แล้ว +1

    So useful!!! Thank You

  • @EugegegeSky
    @EugegegeSky 2 ปีที่แล้ว +1

    you are the best!!

  • @arjunramprasad6752
    @arjunramprasad6752 2 ปีที่แล้ว +1

    Amazing tutorial!

  • @motuagrakalam7749
    @motuagrakalam7749 3 ปีที่แล้ว +1

    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.)

  • @lookaway8496
    @lookaway8496 2 ปีที่แล้ว

    So good! this is much simpler explanation. I love it

  • @yangelena7135
    @yangelena7135 2 ปีที่แล้ว +2

    Hi thank you for sharing. But I am wondering how do you get the actual linear regression equation with sklearn

  • @APPRENTINazmi
    @APPRENTINazmi 3 ปีที่แล้ว +1

    very nice and easy teaching. Congrats.

  • @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.

  • @owonubijobsunday4764
    @owonubijobsunday4764 ปีที่แล้ว

    I liked the video, so I "Liked" and I "Subscribed"
    Thanks, MN

  • @myandrobox3427
    @myandrobox3427 2 ปีที่แล้ว +1

    Excellent💯👍

  • @kenjalgundecha5870
    @kenjalgundecha5870 3 ปีที่แล้ว

    Very Nice Megha..Just if you give some explanation of functions which are using then it will be more clear. Nice Attempt!!!

  • @Pimentocompany_
    @Pimentocompany_ 2 ปีที่แล้ว +1

    Hello I have this problem how can I solve it?
    (could not convert string to float: 'rainy')

  • @pursuingperfectionn
    @pursuingperfectionn 2 ปีที่แล้ว

    Simply Brilliant !!

  • @samahabdalrahim3709
    @samahabdalrahim3709 3 ปีที่แล้ว +1

    thanks a lot, please I want to know which algorithm is used (batch, stochastic...?) also can we show the cost function?

  • @gamingnews2716
    @gamingnews2716 3 ปีที่แล้ว +1

    Mam plzz further model bi explain kardo...
    Waiting for your further ML lecture mam

  • @wayneemery9276
    @wayneemery9276 2 ปีที่แล้ว +5

    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?

  • @sreekanthreddy7452
    @sreekanthreddy7452 3 ปีที่แล้ว +1

    Keep it up and make videos on other models too mam.

  • @Deepsim
    @Deepsim 2 ปีที่แล้ว

    I really like your well organized presentation structure!

  • @DVijebahu
    @DVijebahu 3 ปีที่แล้ว +1

    Clear and Nice explanation....

  • @ankitmaithani3558
    @ankitmaithani3558 2 ปีที่แล้ว +1

    Great Ma'am

  • @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

  • @greenfootprint2680
    @greenfootprint2680 ปีที่แล้ว

    Great breakdown! Liked and Sub 👌

  • @otenyop
    @otenyop ปีที่แล้ว

    Excellent!

  • @wahu9578
    @wahu9578 2 ปีที่แล้ว +1

    @ 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?

  • @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.

  • @chandrashakhar1800
    @chandrashakhar1800 3 ปีที่แล้ว +2

    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 2 ปีที่แล้ว

      @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

  • @shakirullah5840
    @shakirullah5840 3 ปีที่แล้ว

    Very nice video. Thank you so much and Best of luck--Shakir, Bangladesh

  • @sam-mv6vj
    @sam-mv6vj 3 ปีที่แล้ว

    Very well done mam,why didn't you do outlier treatment mam ?

  • @shantanulokhande1792
    @shantanulokhande1792 3 ปีที่แล้ว +2

    Thank you so much. It was really helpful!!!

  • @Kod.u
    @Kod.u 2 ปีที่แล้ว +1

    Really helpful tutorial! Thank you.

  • @waqasrana7891
    @waqasrana7891 3 ปีที่แล้ว +1

    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.

  • @danielstafford6858
    @danielstafford6858 3 ปีที่แล้ว +1

    brilliant video

  • @petelok9969
    @petelok9969 2 ปีที่แล้ว

    Fantastic tutorial. Question I have is if I wanted to test my model on another dataset how could I do it once I have my coefficients and intercept? Best Wishes Peter

  • @Eddyyc
    @Eddyyc 3 ปีที่แล้ว +1

    Hi Megha, thanks for this great video, very simple question may be for you, on your predicted values chart, is there a way to plot a straight line across those values?

    • @aju5405
      @aju5405 3 ปีที่แล้ว +1

      Like simple linear regression?

  • @SandeepYADAVggn
    @SandeepYADAVggn 2 ปีที่แล้ว

    Brilliantly explained. Can u make video for deployment of model to use with webpage/android or any programming language GUI through API . Also make such a beautifully explained video for ANN also.

  • @srikanthgiri2781
    @srikanthgiri2781 2 ปีที่แล้ว +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_.

  • @lekhrajmalviya4927
    @lekhrajmalviya4927 ปีที่แล้ว

    Very nice explaination. Could you please tell how we can get equation for the predicted model?

  • @renato.aravena4051
    @renato.aravena4051 2 ปีที่แล้ว

    Cleannn tutorial, the best of all, thx :))

  • @norahassan3407
    @norahassan3407 2 ปีที่แล้ว

    very insightful many thanks for your impressive work

  • @sukh172
    @sukh172 2 ปีที่แล้ว

    hello Megha, this is good one , easy for beginner ....kindly upload on clustering neural network also

  • @kuriansimon4521
    @kuriansimon4521 3 ปีที่แล้ว

    Very good video... Also why did we import numpy library in the beginning.

    • @MeghaNarang
      @MeghaNarang  3 ปีที่แล้ว

      Thanks, you can import it later too.

  • @syeda8343
    @syeda8343 2 ปีที่แล้ว +2

    Mam I got an error ln[8]
    Could not convert string to float:AT
    How to fix it? Can anyone tell me?

  • @girishchhonkar9391
    @girishchhonkar9391 2 ปีที่แล้ว

    Great explanation mam...just simple and smooth 😃..keep uploading videos

  • @pinkysaikiadutta9752
    @pinkysaikiadutta9752 3 ปีที่แล้ว

    Very nice explanation. Thanks!! for the explanation

  • @AshrafulAlam-ms4gf
    @AshrafulAlam-ms4gf 2 หลายเดือนก่อน

    nice practical

  • @sadhanabarman3178
    @sadhanabarman3178 ปีที่แล้ว

    Ma'am can we get regression for more than 2 independent variables w.r.t more than two dependent variable??

  • @mansoorahmed4150
    @mansoorahmed4150 3 ปีที่แล้ว

    could you please tell more, using multiple regression which technique you follow? I mean OLS or else?

  • @KiratAlreja
    @KiratAlreja 3 ปีที่แล้ว

    Mam, how do we predict multiple target values (y variables) with a single linear regression model?

  • @junedhussain8705
    @junedhussain8705 2 ปีที่แล้ว

    This is such an amazin video. It helps me with my course. I subscribed. Could you please make a video on Ploty Dashboard?

  • @prabirdas8430
    @prabirdas8430 3 ปีที่แล้ว +1

    Nice explanation 👍🏻

  • @dhaneshsarpale1718
    @dhaneshsarpale1718 3 ปีที่แล้ว +1

    simple explanation... Thank you mam

  • @jiwan-darshan.
    @jiwan-darshan. 4 หลายเดือนก่อน

    If we have two outputs in multiple linear regression model. What are the steps ?

  • @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 .🤔

  • @venkateshvajja3666
    @venkateshvajja3666 3 ปีที่แล้ว

    Superb explanation madam thank you

  • @tvnrrk
    @tvnrrk 3 ปีที่แล้ว +1

    @Megha thank you so much for clear explanation. Much appreciated. can you pleased help to create video on how to improve model further.

    • @MeghaNarang
      @MeghaNarang  3 ปีที่แล้ว +2

      sure, I will try to upload a new video soon

  • @cemilisilak2966
    @cemilisilak2966 2 ปีที่แล้ว

    thx for video a lot. But what about the prediction of finding most minimum value in according to independents variables. How can we find it? thanks in advance

  • @An-yq6oy
    @An-yq6oy 2 ปีที่แล้ว

    Very useful

  • @feralvarez8133
    @feralvarez8133 2 ปีที่แล้ว

    THANKYOU GREAT VIDEO

  • @jongcheulkim7284
    @jongcheulkim7284 3 ปีที่แล้ว

    Thank you so much. This is very helpful.

  • @SanaShaikh-sm7kz
    @SanaShaikh-sm7kz 3 ปีที่แล้ว +1

    Thanks a lot..this video has helped me a lot in my project❤❤❤❤

    • @MeghaNarang
      @MeghaNarang  3 ปีที่แล้ว

      Glad I could help :)