Regression

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Sahar Aldhaheri

Regression in Machine Learning


Dependent and independent variables.
Regression in Machine Learning

Regression finds correlations between dependent and independent


variables. Therefore, regression algorithms help predict continuous
variables such as house prices, market trends, weather patterns, oil and
gas prices (a critical task these days!), etc.

The Regression algorithm’s task is finding the mapping function so we


can map the input variable of “x” to the continuous output variable of “y.”
Regression in Machine Learning

In the figure above, on X-axis is


the independent variable and on
Y-axis is the output. The
regression line is the best-fit line
for a model. And our main
objective in this algorithm is to find
this best-fit line.
Understanding Linear Regression
Understanding Linear Regression
Understanding Linear Regression
Understanding Linear Regression
Understanding Linear Regression
Multiple Linear Regression

Multiple linear regression is used to estimate the relationship between two


or more independent variables and one dependent variable.

• How strong the relationship is between two or more independent


variables and one dependent variable (e.g. how rainfall, temperature, and
amount of fertilizer added affect crop growth).
• The value of the dependent variable at a certain value of the independent
variables (e.g. the expected yield of a crop at certain levels of rainfall,
temperature, and fertilizer addition).
Pros of Linear‫؛‬Regression
Correlation coefficient
The correlation coefficient is a statistical metric that measures the
strength and direction of a linear relationship between two continuous
variables. It provides valuable insights into how closely the two
variables move together
Correlation coefficient
The correlation coefficient is a statistical metric that measures the
strength and direction of a linear relationship between two continuous
variables. It provides valuable insights into how closely the two
variables move together
R-squared
R-squared (R2) is a statistical measure that represents the proportion
of the variance for a dependent variable that's explained by an
independent variable or variables in a regression model.

R-squared ranges from 0 to 1, where:

R-squared = 0 indicates that the model explains none of the variances in the
target variable and performs no better than predicting the mean of the
target.
R-squared = 1 indicates that the model perfectly explains all the variance in
the target variable and makes perfect predictions
R-squared
R-squared

You might also like