Linear Regression in Python using Statsmodels 2021 [New🔴]

preview_player
Показать описание
In this tutorial video, we learned Linear Regression in Python using statsmodels. To do the analysis, we used least square method for linear regression analysis. Click "Show more" to learn more 👇:-

Statsmodels python package is used to compute regression with multiple predictors.

Topics covered:
• How to do linear regression in Python?
• statsmodel for linear regression in Python
• Interpretation of the linear regression results in Python
• Making predictions based on the regression results
• Introduction (0:00)
• Data for Linear regression in Python (2:00)
• Using statsmodels for linear regression (4:00)
• Making Predictions based on the Regression Results (6:25)
• Ploting linear regression curve in python (9:30)
• Analysis of linear regression equation (12:42)

𝐆𝐞𝐭 𝐢𝐧𝐬𝐭𝐚𝐧𝐭 𝐮𝐩𝐝𝐚𝐭𝐞𝐬 𝐚𝐛𝐨𝐮𝐭 𝐭𝐡𝐞 𝐥𝐚𝐭𝐞𝐬𝐭 𝐯𝐢𝐝𝐞𝐨𝐬:

Linear regression is used as a predictive model that assumes a linear relationship between the dependent variable (which is the variable we are trying to predict/estimate) and the independent variable/s (input variable/s used in the prediction).

Under Simple Linear Regression, only one independent/input variable is used to predict the dependent variable. It has the following structure:

Y = C + M*X

Y = Dependent variable (output/outcome/prediction/estimation)
C = Constant (Y-Intercept)
M = Slope of the regression line (the effect that X has on Y)
X = Independent variable (input variable used in the prediction of Y)

𝐌𝐚𝐤𝐞 𝐬𝐮𝐫𝐞 𝐭𝐨 𝐬𝐮𝐛𝐬𝐜𝐫𝐢𝐛𝐞 𝐬𝐨 𝐲𝐨𝐮 𝐝𝐨𝐧'𝐭 𝐦𝐢𝐬𝐬 𝐨𝐮𝐭 𝐨𝐧 𝐦𝐲 𝐟𝐮𝐭𝐮𝐫𝐞 𝐯𝐢𝐝𝐞𝐨𝐬:

After subscribing, 𝐠𝐞𝐭 𝐟𝐫𝐞𝐞 𝐚𝐜𝐜𝐞𝐬𝐬 𝐭𝐨 𝐦𝐲 𝐆𝐨𝐨𝐠𝐥𝐞 𝐃𝐫𝐢𝐯𝐞: Follow steps on my YouTube Channel.

I used Anaconda jupyterlab for this code. It is an amazing platform for beginners. #fpritvik #regression
Рекомендации по теме
Комментарии
Автор

thank you. How would you predict the value for a single point? In other words how can I predict the value of the dependent variable from one indepedent variable?

tonycardinal
Автор

Thanks for showing polynomial regression. Need clarification, when you are using x1^2 as a different variable (thus, making the quadratic equation as a multi-linear regression, we will have issue of multicolleniarity, between x1 and x1^2 variables. And one of the assumptions for linear regression model is :


No Multicollenearity - i.e., two and more variables shouldn't have high correlation b/w each other


Considering that this assumption is getting violated, so our result in your example can't be right. Please correct my understanding, if wrong.

faltumaintimepass
Автор

Thank you! This is very helpful. Will be using it for my project

deekshitashamchavan
Автор

Bro LinearRegression from sklearn is different method and StatsModel is different??

alfazbaig
Автор

why did't you used train test split

amolkabugade
join shbcf.ru