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

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 194

  • @cowjacketstudiostm5902
    @cowjacketstudiostm5902 3 года назад +22

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

  • @omarelliottgreen823
    @omarelliottgreen823 2 года назад +19

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

  • @b048peyyettipavankartikpra4
    @b048peyyettipavankartikpra4 9 месяцев назад +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

  • @tammu478
    @tammu478 2 года назад +1

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

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

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

  • @nihinlolakukoyi5987
    @nihinlolakukoyi5987 2 года назад

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

  • @samarthchakrawartiblogsand4809
    @samarthchakrawartiblogsand4809 2 года назад

    For a beginner this video is a big help!!

  • @SKini18
    @SKini18 2 месяца назад

    Very nice. Exactly what I was looking for

  • @vinayshukla3800
    @vinayshukla3800 2 года назад +1

    GREAT WORK MEM👏👏👏👏👏

  • @anuarohi2335
    @anuarohi2335 9 месяцев назад

    Very meaningful session, great explanation 👍

  • @indointanchannel
    @indointanchannel 2 года назад

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

  • @avinashsiripuram1058
    @avinashsiripuram1058 3 года назад

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

  • @CFDAsmaaHadane
    @CFDAsmaaHadane 2 года назад +1

    Thank you for this very informative tutorial! Please keep uploading

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

  • @ranulmbalasooriya659
    @ranulmbalasooriya659 2 года назад +1

    Thank you so much for the clear explanation.

  • @prabirdas8430
    @prabirdas8430 3 года назад +1

    Nice explanation 👍🏻

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

  • @APPRENTINazmi
    @APPRENTINazmi 3 года назад +1

    very nice and easy teaching. Congrats.

  • @myandrobox3427
    @myandrobox3427 2 года назад +1

    Excellent💯👍

  • @hanifullah1088
    @hanifullah1088 2 года назад +1

    Very clear and to the point . . . .kindly make similar videos for each topic such as Decision tree classifier etc

  • @lookaway8496
    @lookaway8496 2 года назад

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

  • @bonganindlovundlonu3239
    @bonganindlovundlonu3239 2 года назад +1

    Awesome video. keep on doing great

  • @datawithalvin
    @datawithalvin 2 года назад +1

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

  • @DVijebahu
    @DVijebahu 3 года назад +1

    Clear and Nice explanation....

  • @resreng
    @resreng 2 года назад

    Thank you so so so much for clearing the concepts.

  • @arjunramprasad6752
    @arjunramprasad6752 2 года назад +1

    Amazing tutorial!

  • @Deepsim
    @Deepsim 3 года назад

    I really like your well organized presentation structure!

  • @abdullahateeq1236
    @abdullahateeq1236 2 года назад +1

    Thank you for the visualization.... :)

  • @Kod.u
    @Kod.u 2 года назад +1

    Really helpful tutorial! Thank you.

  • @emanuelbyas9819
    @emanuelbyas9819 2 года назад +1

    Thank you so much! Super Clear!

  • @mallelasunny
    @mallelasunny 3 года назад +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?

  • @Jobic-10
    @Jobic-10 Год назад

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

  • @cass1522
    @cass1522 2 года назад +1

    Thank you so much for the video!

  • @sreekanthreddy7452
    @sreekanthreddy7452 3 года назад +1

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

  • @EddyFisico
    @EddyFisico Год назад

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

  • @shakirullah5840
    @shakirullah5840 3 года назад

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

  • @shantanulokhande1792
    @shantanulokhande1792 3 года назад +2

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

  • @alyaaazlan7794
    @alyaaazlan7794 Год назад +1

    This is sooooo Great!!!

  • @dhaneshsarpale1718
    @dhaneshsarpale1718 3 года назад +1

    simple explanation... Thank you mam

  • @pinkysaikiadutta9752
    @pinkysaikiadutta9752 3 года назад

    Very nice explanation. Thanks!! for the explanation

  • @girishchhonkar9391
    @girishchhonkar9391 3 года назад

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

  • @greenfootprint2680
    @greenfootprint2680 2 года назад

    Great breakdown! Liked and Sub 👌

  • @pursuingperfectionn
    @pursuingperfectionn 2 года назад

    Simply Brilliant !!

  • @norahassan3407
    @norahassan3407 2 года назад

    very insightful many thanks for your impressive work

  • @sunandadebnath96
    @sunandadebnath96 2 года назад +1

    you are life saver

  • @wayneemery9276
    @wayneemery9276 3 года назад +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?

  • @ca2hill
    @ca2hill 2 года назад +1

    So useful!!! Thank You

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

  • @SanaShaikh-sm7kz
    @SanaShaikh-sm7kz 3 года назад +1

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

  • @raj4624
    @raj4624 3 года назад

    Nice video mam .. God bless you ☺️

  • @abdikadirabdi6107
    @abdikadirabdi6107 10 месяцев назад

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

  • @EugegegeSky
    @EugegegeSky 2 года назад +1

    you are the best!!

  • @yangelena7135
    @yangelena7135 2 года назад +2

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

  • @renato.aravena4051
    @renato.aravena4051 3 года назад

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

  • @NK-vd8xi
    @NK-vd8xi 2 года назад

    What keyboard are you using? It sounds so soothing.

  • @rabiulmallick8991
    @rabiulmallick8991 2 месяца назад +1

    thank you miss

  • @danielstafford6858
    @danielstafford6858 3 года назад +1

    brilliant video

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

  • @ankitmaithani3558
    @ankitmaithani3558 2 года назад +1

    Great Ma'am

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

  • @jongcheulkim7284
    @jongcheulkim7284 3 года назад

    Thank you so much. This is very helpful.

  • @gamingnews2716
    @gamingnews2716 3 года назад +1

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

  • @otenyop
    @otenyop Год назад

    Excellent!

  • @adityajawla723
    @adityajawla723 3 года назад

    Hi Thanks for the informational video, it is very easy to understand.

  • @venkateshvajja3666
    @venkateshvajja3666 3 года назад

    Superb explanation madam thank you

  • @ayoajayi280
    @ayoajayi280 Год назад

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

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

  • @Pimentocompany_
    @Pimentocompany_ 2 года назад +1

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

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

  • @atoffice7323
    @atoffice7323 3 года назад

    very nice presentation..

  • @KiratAlreja
    @KiratAlreja 3 года назад

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

  • @wahu9578
    @wahu9578 3 года назад +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?

  • @sam-mv6vj
    @sam-mv6vj 3 года назад

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

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

  • @sukh172
    @sukh172 2 года назад

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

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

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

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

  • @vijaybhatt8060
    @vijaybhatt8060 3 года назад

    simply awesome

  • @priyankasahu6629
    @priyankasahu6629 2 года назад

    Thank you so much ❤️

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

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

  • @syeda8343
    @syeda8343 3 года назад +2

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

  • @laxmanbisht2638
    @laxmanbisht2638 3 года назад

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

  • @AshrafulAlam-ms4gf
    @AshrafulAlam-ms4gf 4 месяца назад

    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?

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

  • @lekhrajmalviya4927
    @lekhrajmalviya4927 Год назад

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

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

  • @junedhussain8705
    @junedhussain8705 3 года назад

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

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

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

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