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

Experiment 4: Implement Linear Regression on the given dataset

Learning Objective: Students should be able to implement simple linear regression on the given
dataset.

Tools: Jupyter Notebook

Theory:
Simple Linear Regression:

Simple linear regression is a statistical method that allows us to summarize and study
relationships between two continuous (quantitative) variables:
One variable, denoted x, is regarded as the predictor, explanatory, or independent variable.
The other variable, denoted y, is regarded as the response, outcome, or dependent variable.

The Simple Linear Regression model can be represented using the below equation:
Y = a0 +a1x+ ε
Where,
a0= It is the intercept of the Regression line (can be obtained putting x=0)
a1= It is the slope of the regression line, which tells whether the line is increasing or decreasing.
ε = The error term. (For a good model it will be negligible)

Simple Linear Regression Algorithm

Step-1: Data Pre-processing


Step-2: Fitting the Simple Linear Regression to the Training Set
Step: 3. Prediction of test set result
Step: 4. visualizing the Training set results

1
Result and discussion:

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

Learning Outcomes: Students should have the ability to


LO 4.1: Understand Linear Regression Algorithm
LO 4.2: Implement Linear Regression in python.

Course Outcomes: Understand features of Model Building

Conclusion

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

Viva Questions:
Q.1 What is simple linear regression ?
Q.2 What are the steps used in linear regression algorithms ?

For Faculty Use

Correction Formative Timely Attendance /


Parameters Assessment completion of Learning
[40%] Practical [ Attitude
40%] [20%]

Marks
Obtained

2
3

You might also like