Multiple Linear Regression using python and sklearn

Multiple linear regression is the most common form of linear regression analysis. As a predictive analysis, the multiple linear regression is used to explain the relationship between one continuous dependent variable and two or more independent variables.
References - Kirell Ermenko Projects On Linear Regression. This video is dedicated to him
Please subscribe and share the channel
Simple Linear Regressiion link: • Simple Linear Regressi...
Github link: github.com/krishnaik06/Multip...
You can buy my book where I have provided a detailed explanation of how we can use Machine Learning, Deep Learning in Finance using python
Packt url : prod.packtpub.com/in/big-data...
Amazon url: www.amazon.com/Hands-Python-F...

Пікірлер: 134

  • @somjitdas6034
    @somjitdas60342 жыл бұрын

    I was struggling with Linear and Multiple regression for over 1 month. Finally, the puzzle is solved. Thanks a million, Krish. You are simply outstanding.

  • @ShahidIqbal-sq7bf
    @ShahidIqbal-sq7bf4 жыл бұрын

    You are a genius I have spent so much for a course that offered me nothing. Thank you again Sir may God bless you

  • @noahrubin375
    @noahrubin3753 жыл бұрын

    Yep, this was the video I was looking for!

  • @annalyticsannalizaramos5890
    @annalyticsannalizaramos58903 жыл бұрын

    I like this comprehensively explain the details. Thank you for this content. Excellent job!

  • @ijeffking
    @ijeffking5 жыл бұрын

    Very nice pointers. Thank you Krish. Keep up the good work.Looking forward to your Deep Learning Videos. Learning a lot from you.

  • @Rafian1924
    @Rafian19244 жыл бұрын

    Multiple linear regression made so simple Krish sir.. I am highly indebted to you. Great job!!

  • @tanvisharma8346
    @tanvisharma83464 жыл бұрын

    Thank you. This is Very Helpful!!

  • @drvk999
    @drvk9995 жыл бұрын

    You described the multiple regression very well...Thank you. I would appreciate if you can do a detailed video on r square and adjusted r square etc (Intuition and concept wise)

  • @meetmeraj2000
    @meetmeraj20004 жыл бұрын

    Sir, dont we have to first check the assumption for linear regression before fitting into the model? and adjusted r2 should be a good option in multiple linear regression?

  • @akilaj
    @akilaj3 жыл бұрын

    This is a good one. Plain and simple for a beginner. Keep up your work

  • @nanditasahu2358
    @nanditasahu23583 жыл бұрын

    Sir your content are brisk clear , the content is accurate as well as the explanation .Thanks for the effort.

  • @vedantmhatre4731
    @vedantmhatre47315 жыл бұрын

    Nice Explanation. You deserve more viewers.

  • @gaznavie8420
    @gaznavie84203 ай бұрын

    Whatever i have learnt from the theory today finally i came to know how to implement Thankyou Sir

  • @deepakkumarsingh9781
    @deepakkumarsingh97815 жыл бұрын

    Thanks Sir for this video.. It's really unique and helpful..

  • @manishhedau119
    @manishhedau1194 жыл бұрын

    You are doing great of the world is teaching and it will helpful for so many people I personally thank you a lot for doing this kind of good things for us .. Salute you man

  • @shilpikulshrestha9487
    @shilpikulshrestha94875 жыл бұрын

    Help full video, thank you sir

  • @gorenekli
    @gorenekli2 жыл бұрын

    Thank you for your detailed explanation.

  • @shivtripathi2843
    @shivtripathi28434 жыл бұрын

    Very useful tutorial. Keep it up!

  • @sowjanyay3424
    @sowjanyay3424 Жыл бұрын

    Extraordinary explanation 👌👌👌

  • @nehasehta7762
    @nehasehta77623 жыл бұрын

    Sir how we decide that we should go for linear regression, there may be non linear relationships in dependant and independent features.

  • @abhishek-hb1vg
    @abhishek-hb1vg5 жыл бұрын

    Please make a video on Multiple Linear Regression using the stats model. with forward and backward elimination technique.

  • @harisjoseph117
    @harisjoseph1173 жыл бұрын

    Very nice Explanation. Keep it up Krish.

  • @shaileshmallya9857
    @shaileshmallya98575 жыл бұрын

    Good video. Thanks Krish.

  • @dr.nafeesahamad8567
    @dr.nafeesahamad85673 жыл бұрын

    This is a really good video, Sir. Thanks

  • @jongcheulkim7284
    @jongcheulkim72842 жыл бұрын

    Thank you so much.

  • @user-wj9nc2yh3i
    @user-wj9nc2yh3i11 ай бұрын

    When you come in board is good to understand sir you are well and excellent teacher

  • @rajsuraaj2125
    @rajsuraaj21255 жыл бұрын

    Hi Krish Thanks for adding all these videos which are very helpful .. and plz plot a pair plot graph for this MLR model. Thankyou.

  • @SANYOG41
    @SANYOG414 жыл бұрын

    @krish amazing explaination

  • @sohaibzq9649
    @sohaibzq96494 жыл бұрын

    You missed the most important part of plotting the best fit line The second question is when we have n dimensions (n variables in linear regression) can we apply pca ??

  • @riteshshrimali1358
    @riteshshrimali13582 жыл бұрын

    excellent explanation of MLR with python coding

  • @akhiljose7539
    @akhiljose75394 жыл бұрын

    good video! Thank you

  • @cypheranalytica6066
    @cypheranalytica60665 жыл бұрын

    Nice Video!

  • @SatendraYadav-cs1yh
    @SatendraYadav-cs1yh4 жыл бұрын

    This video is really help to me thanks you so much bro

  • @bobbyreynaldo7266
    @bobbyreynaldo72663 жыл бұрын

    I like your explanation

  • @haridaasan
    @haridaasan Жыл бұрын

    Thanks for the video sir - but could you say why we have not scaled the values using standard scaler?

  • @chakree100
    @chakree1005 жыл бұрын

    Thanks a lot krish

  • @osamazafar7350
    @osamazafar73505 жыл бұрын

    Sir. A big thanks

  • @shakyasarkar7143
    @shakyasarkar71434 жыл бұрын

    Sir this was super useful!!! Hats off! But since we are deleting the California feature, then how are going to find the co-efficient for that particular dropped out California independent feature?

  • @gokuljith
    @gokuljith4 жыл бұрын

    Kudos Krish bro. In LinearRegression from sklearn.linear_model, how do we reduce the error. Is there no gradient descent to reduce the error or Linear regression itself gives you the output ?

  • @amazon628
    @amazon6284 жыл бұрын

    Hello Krish. Really good work. We do not these in-depth knowledge on high end paid courses.

  • @kaveenjayamanna1509
    @kaveenjayamanna15092 жыл бұрын

    Hi Krish, Don't we have to find out the P-value for this model? or R squared is just good enough?

  • @ThobelaGoge
    @ThobelaGoge2 ай бұрын

    Spyder looks cool...I might switch to it😃. Great video man👌

  • @bhalchandrakolekar8176
    @bhalchandrakolekar81764 жыл бұрын

    hey krish, why didnt you use feature scaling for independent variables?

  • @santosh_Benkiee
    @santosh_Benkiee3 жыл бұрын

    Thank you 🙏 sir

  • @middle_class_Me
    @middle_class_Me4 жыл бұрын

    1)sir take some big data sets and explain like daily time works.... 2)how do we identify the algorithm by seeing data set also explin sir plzzz.. 3)make some analysis parts of an data sets how to analise the data by seeing those datasets

  • @ballesulaimonolanrewaju6451
    @ballesulaimonolanrewaju64512 жыл бұрын

    Hi @Krish Niak, 1. Why didn't you use IDE Jupyter notebook for Multiple Linear Regression? 2. Why did you decided to use IDE Spider?

  • @okamasnr4891
    @okamasnr48914 жыл бұрын

    good presentation..kindly do a video on logistic regression where you are using to make prediction..

  • @ShahidIqbal-sq7bf
    @ShahidIqbal-sq7bf4 жыл бұрын

    if I have to plot a graph to visually understands the difference between y_pred and y_test is there a code to do it I have checked multiple sites but none has answered my question

  • @2010aurnob
    @2010aurnob4 жыл бұрын

    Great video!!! What does test_size=0.2 imply? Is it going to take 20% of data from the dataframe for randomly testing? Also, is it possible to do multivariate non-linear regression in python?

  • @rajdeeproy5264

    @rajdeeproy5264

    2 жыл бұрын

    we are dividing the dataset into 80:20 ratio of train and test split respectively. So test_size = 0.2 implies 20% test and 80% train

  • @abhisknowledge5514
    @abhisknowledge55144 ай бұрын

    sir just one small doubt instead of x=dataset.iloc[:,:-1] can i use dataset.drop("price")

  • @abhinavm9685
    @abhinavm96853 жыл бұрын

    You are god! thanks a lot for this!!

  • @arunxavier502
    @arunxavier5024 жыл бұрын

    Hi..when u compared the data of testy and predy..the indexes were different? is that ok?

  • @jogindersingh4281
    @jogindersingh42815 жыл бұрын

    What made you use MLR model on this data set?? Why not other model..i have understood the concept of MLR but how do we know when to use it??

  • @sidduhedaginal
    @sidduhedaginal4 жыл бұрын

    Hey Krish, Good explanation. have a doubt here, why do you take X_train, X_test, y_train, and y_test am confused? Kindly clarify

  • @GagandeepSingh-qs2vh

    @GagandeepSingh-qs2vh

    4 жыл бұрын

    We usually reserve some data for testing purpose. Let's say you trained your model on 80% data. Now, it might be possible that your model says it has accuracy of 90% on training data but that doesn't mean it is a good model. So, you'll have to test it on testing data which is unseen for model. In simple words it is going to tell you how your model is going to perform in real world scenario (the data which it has never seen).

  • @ssalvi28
    @ssalvi282 жыл бұрын

    That was a great explanation Krish, thank you! **Doubt : If the number of states would have been 20 (or greater ) how to proceed in such case? **

  • @ssshanmugam4514
    @ssshanmugam45144 жыл бұрын

    Nice

  • @learnforfuture2611
    @learnforfuture26113 жыл бұрын

    Sir , is random state will affect our model if we increase it.

  • @sangamithrajen
    @sangamithrajen4 жыл бұрын

    hi Krish, what is the purpose of converting categorical predictors into indicators like 0,1, or 2? Does it mean we can do manipulation with quantitative values only?

  • @theshishir24

    @theshishir24

    3 жыл бұрын

    ML algo always take numerical values. Hope it helped.

  • @shubhendusingh5143
    @shubhendusingh51433 жыл бұрын

    This was a good start to explain the basics of regression. But this doesnt seem complete as there could have been a visualization piece as well to explain how the regression worked. Also, what did we do with the train dataset? Is there a follow-up video on this?

  • @BhupinderSingh-rg9be
    @BhupinderSingh-rg9be4 жыл бұрын

    sir its a request that u pls upload more and more data set on your github with code so that we can practice more.Thank u sir!

  • @ManpreetSingh-ew8qs
    @ManpreetSingh-ew8qs5 жыл бұрын

    Hey can we use backward elimination method? And what's its purpose

  • @devendarreddydev8545
    @devendarreddydev85453 жыл бұрын

    Tq sir for this vedio and also provide graph for this plz

  • @mmouhnari
    @mmouhnari3 жыл бұрын

    Good explanation even if the sound wasn't very good :) But we would like to know how could we make a data visualisation event with 3 or more explicative or dependent variables before the regression and surface that could occur once we get our model. Plz if you have any idea that's matter to be shared. Thank you !

  • @hridoyahmed9964
    @hridoyahmed99644 жыл бұрын

    Its a good video, but sir ensure the good sound quality of the video.

  • @shubhamkundu2228
    @shubhamkundu22283 жыл бұрын

    Can we use Ridge and LAsso Regression models as well where we use Multiple Linear Regression?

  • @rbwebcom1658
    @rbwebcom16584 жыл бұрын

    sir how to check with a simple an get a predcition..Thank you

  • @marishakrishna
    @marishakrishna Жыл бұрын

    How we calculate beta not ie. the intercept

  • @syedmuhammadaskarizaidi2294
    @syedmuhammadaskarizaidi22943 жыл бұрын

    Can non-numeric feature problem be solved by label encoding?

  • @tejasahuonly4u325
    @tejasahuonly4u3254 жыл бұрын

    Sir after including sklearn library module not found error id occur what should I need to do sir

  • @sarvjeetbhardwaj6964
    @sarvjeetbhardwaj69642 жыл бұрын

    In this problem , why we didn't we scale the features using Standardscalar or Minmax ?

  • @raghuvamsi8762
    @raghuvamsi87625 жыл бұрын

    can you explain visulatization of multiple linear regression

  • @noteuler314
    @noteuler3143 жыл бұрын

    please use regularisation and MCA also sir with multiple linear regression

  • @rohitlalwani8462
    @rohitlalwani84623 жыл бұрын

    If while doing get dummies we would not have dropped california state will it have an impact?

  • @mukulmishra2296
    @mukulmishra22964 жыл бұрын

    please do make some videos on Target encoding.

  • @raviteja2475
    @raviteja24755 жыл бұрын

    Thanks for the explanation.... Sir if R2 coming nearer to zero....in this case what we need to do....How to check which attributes are spoiling the regression line

  • @aashishdagar3307

    @aashishdagar3307

    3 жыл бұрын

    @ravi Teja there are multiple methods to feature selection(attributes) like forward selection, backward, etc you can use either it's your comfortability.

  • @gauravtak9787
    @gauravtak97874 жыл бұрын

    sir u predict X_test data if we want to predict some random data given by user how to predict that......how to giev random data for each variables for new prediction....

  • @shubhamkundu2228
    @shubhamkundu22283 жыл бұрын

    what is the disadvantage of dummy variable trap? What if I don't drop any dummy variable, what's the impact of it in ML Model? Reason to drop any one dummy variable ?

  • @sairampenjarla
    @sairampenjarla3 жыл бұрын

    guys, we can remove test_size and put random state = 10 to get 98% accuracy

  • @akashgayakwad9550
    @akashgayakwad95504 жыл бұрын

    U used index as bo is it right?

  • @MrJaga121
    @MrJaga1214 жыл бұрын

    Hi, Can you explain when to go for linear regression? What are the pre requisites to check if a input and output will fit in a linear regression model or not.

  • @middle_class_Me

    @middle_class_Me

    4 жыл бұрын

    yes

  • @middle_class_Me

    @middle_class_Me

    4 жыл бұрын

    even i have the same dought

  • @prabuddh_mathur
    @prabuddh_mathur3 жыл бұрын

    Hey! I was wondering why you didn't use OneHotEncoder from sklearn.preprocessing?? It would have been a nice two step conversion as follows from sklearn.compose import ColumnTransformer from sklearn.preprocessing import OneHotEncoder cl=ColumnTransformer(transformers=['encoder', OneHotEncoding(), [*Column index which needs to be encoded*]], remainder = 'passthrough') x = np.array(cl.fit_transform(x))

  • @dilippradhan94
    @dilippradhan945 жыл бұрын

    Bro make a video on Ridge regression

  • @abhijotsingh8502
    @abhijotsingh85022 жыл бұрын

    Found input variables with inconsistent numbers of samples: [100, 50]. Sir this error is coming can you help me solve it

  • @kanyadharani6844
    @kanyadharani68443 жыл бұрын

    Can we use mapping instead of getting dummies and concatenating it.

  • @praveenkumarsingh8723
    @praveenkumarsingh87234 жыл бұрын

    how can i get data set

  • @ammanh
    @ammanh3 жыл бұрын

    if my R^2 value is not close to 1 than what should i do?

  • @abhishekpawar3845
    @abhishekpawar38454 жыл бұрын

    how to plot it on graph?

  • @user-fh3gr7sq1z
    @user-fh3gr7sq1z4 жыл бұрын

    this tutorial help me, but it missimg few thinsgs : how to find PVALUE of each x + how to calculte cost function + how to do prediction on new dataset with the model we made .... do you have this kind of tutorial to ?

  • @ShahidIqbal-sq7bf

    @ShahidIqbal-sq7bf

    4 жыл бұрын

    I believe the sckiit learns automatically calculates the best model and the best value for each variable and makes the prediction so you don't have to manually do it.

  • @praveenbhatt3127
    @praveenbhatt31273 жыл бұрын

    I am getting R squared value of 0.95, its so coooool.

  • @sauravksingh
    @sauravksingh3 жыл бұрын

    Can you upload a video on Mulitiple variable/feature Logistic Regression

  • @badalsingh3733
    @badalsingh37335 жыл бұрын

    Would you please visualize it.

  • @zaedgtr6910
    @zaedgtr69109 ай бұрын

    Why does r2_ score changes each time i run this code?

  • @tejassutar4198
    @tejassutar41984 жыл бұрын

    If more than 5 cities are present in State Column how to check that in pyhton?

  • @AK-ws2yw

    @AK-ws2yw

    3 жыл бұрын

    I think Linear Regression handles Numeric type of data, if your aim is to solve with categorical data as input variables then go for Logistic Regression

  • @jayeshjadhav3024
    @jayeshjadhav30244 жыл бұрын

    why you didn't plot graph?

  • @anirudhsrivastava3530
    @anirudhsrivastava35302 жыл бұрын

    sir do for decision tree regressor model, adaboost, xgboost please

  • @nimminavtej428
    @nimminavtej4283 жыл бұрын

    y did you removed california?

  • @jeevanraj1789
    @jeevanraj17892 жыл бұрын

    Where the playlist kindly anyone comment the entire playlist fast

  • @HariPrasad-et6ci
    @HariPrasad-et6ci4 жыл бұрын

    sir ,please explain how to test on new data...

  • @omduttpandey8201
    @omduttpandey82014 жыл бұрын

    Hey Krish its a humble request please explain practically conversion of categorical features practically as i m getting problems with that even i have watched several tutorials such as the one of kirell eremenko of super data science and now even these pd.get_dummies isnt working and i m getting errors like index errors and value errors.

  • @praveenkumarsingh8723
    @praveenkumarsingh87234 жыл бұрын

    sir can you please provide videos on neural network implementation using python