Machine Learning Laboratory (PECO6051L)
Laboratory Report
Experiment No - 1
Batch -
Date of Experiment: __________ Date of Submission: __________
Title: To implement Linear Regression.
___________________________________________________________
Evaluation
1) Attendance [2] ----------------
2) Lab Performance [2] ----------------
3) Oral [1] ----------------
Overall Marks [5] ----------------
Subject Incharge
R. C. Patel Institute of Technology, Shirpur
Machine Learning Laboratory (PECO6051L)
Experiment No. 1
TITLE: To implement Linear Regression.
THEORY:
Linear regression is used to predict the relationship between two variables by applying a linear
equation to observed data. There are two types of variable, one variable is called an independent
variable, and the other is a dependent variable. Linear regression is commonly used for
predictive analysis. The main idea of regression is to examine two things. First, does a set of
predictor variables do a good job in predicting an outcome (dependent) variable? The second
thing is which variables are significant predictors of the outcome variable?
Linear Regression Equation
The measure of the relationship between two variables is shown by the correlation coefficient.
The range of the coefficient lies between -1 to +1. This coefficient shows the strength of the
association of the observed data between two variables. Linear Regression Equation is given
below:
Y=a+bX
Where,
X is the independent variable and it is plotted along the x-axis,
Y is the dependent variable and it is plotted along the y-axis
R. C. Patel Institute of Technology, Shirpur
Machine Learning Laboratory (PECO6051L)
As we know, linear regression shows the linear relationship between two variables. The equation
of linear regression is similar to that of the slope formula. Linear Regression Formula is given
by the equation,
Y= a + bX
We will find the value of a and b by using the below formula.
Example
R. C. Patel Institute of Technology, Shirpur
Machine Learning Laboratory (PECO6051L)
The formula of the linear equation is y=a+bx. Using the formula we will find the value of a and b
R. C. Patel Institute of Technology, Shirpur
Machine Learning Laboratory (PECO6051L)
Hence we got the value of a = 1.5 and b = 0.95. The linear equation is given by.
Y = a + bx
Now put the value of a and b in the equation
Hence equation of linear regression is y = 1.5 + 0.95x
CONCLUSION / RESULT:
In this Experiment, we have performed linear regression on given dataset.
R. C. Patel Institute of Technology, Shirpur