Powerbi 2

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Recap: What the learner have learnt in the week

Linear Regression
Type of machine learning models

Recap: What the learner have learnt in the week


Machine learning models can be classified into the following two categories based on
the learning algorithm:

Supervised learning method: Past data with labels is available to build the model.
• Regression: The output variable is continuous in nature.
• Classification: The output variable is categorical in nature.
Unsupervised learning method: Past data with labels is not available.
• Clustering: There is no predefined notion of labels.
Type of machine learning models

Recap: What isthe


Linear regression learner
a basic have learnt
and commonly used in
typethe week analysis. The overall
of predictive
idea of regression is to examine two things:
• does a set of predictor variables do a good job in predicting an outcome
(dependent) variable?  
• Which variables are significant predictors of the outcome variable, and in what
way do they–indicated by the magnitude and sign of the beta estimates–impact the
outcome variable?  
• These regression estimates are used to explain the relationship between one
dependent variable and one or more independent variables.  The simplest form of
the regression equation with one dependent and one independent variable is
defined by the formula y = c + b*x, where y = estimated dependent variable score,
c = constant, b = regression coefficient, and x = independent variable.
Type of Linear Regression

Linear regression models can be classified into two types depending upon the
number of independent variables: 

• Simple linear regression: This is used when the number of independent


variables is 1.

• Multiple linear regression: This is used when the number of independent


variables is more than 1.
Assumptions of Linear
Regression

• There should be a linear and additive relationship between dependent (response)


variable and independent (predictor) variable(s). A linear relationship suggests
that a change in response Y due to one unit change in X¹ is constant, regardless of
the value of X¹.
• There should be no correlation between the residual (error) terms.(Auto-correlation)
(DW Test)(0-4)
• The independent variables should not be correlated. (Multicollinearity).(VIF)
• The error terms must have constant variance. This phenomenon is known as
homoskedasticity. The presence of non-constant variance is referred to
heteroskedasticity.(Breusch-Pagan Test)
•  The error terms must be normally distributed.(Shapiro-Wilk test)

*Good read :- https://www.analyticsvidhya.com/blog/2016/07/deeper-regression-analysis-assumptions-plots-solutions/


Test in linear regression

Hypothesis testing in linear regression


• To determine the significance of beta coefficients.
• H0:β1=0;HA:β1≠0. 
Building a linear model
• OLS (Ordinary Least Squares) method in stats models to fit a line.
• Summary statistics
• F-statistic, R-squared, Adjusted R-squared, coefficients and their p-values.
Residual Analysis (MAPE, RMAD, WMAPE)

You might also like