You are on page 1of 61

MACHINE

LEARNING -
I
WHAT IS MACHINE LEARNING?
Libraries
What is Linear Regression?
Linear regression is a statistical method that is used to
predict a continuous dependent variable(target variable)
based on one or more independent variables(predictor
variables). This technique assumes a linear relationship
between the dependent and independent variables, which
implies that the dependent variable changes
proportionally with changes in the independent variables.
Mathematically, we can represent a linear
regression as:

y= a0+a1x+ ε
Here,

Y= Dependent Variable (Target Variable)


X= Independent Variable (predictor Variable)
a0= intercept of the line (Gives an additional
degree of freedom)
a1 = Linear regression coefficient (scale factor to
each input value).
ε = random error

The values for x and y variables are training


datasets for Linear Regression model
representation.
Types of Linear Regression:

1. Simple Linear Regression: 2. Multiple Linear regression:

If a single independent variable is If more than one independent


used to predict the value of a variable is used to predict the
numerical dependent variable, value of a numerical dependent
then such a Linear Regression variable, then such a Linear
algorithm is called Simple Linear Regression algorithm is called
Regression. Multiple Linear Regression.
What is the best Fit Line?
Our primary objective while using linear regression is to locate the best-fit
line, which implies that the error between the predicted and actual values
should be kept to a minimum. There will be the least error in the best-fit line.

The best Fit Line equation provides a straight line that represents the
relationship between the dependent and independent variables. The slope
of the line indicates how much the dependent variable changes for a unit
change in the independent variable(s).

You might also like