School of Computer Science and Engineering, VIT Chennai.
BCSE209P Machine Learning Lab-2 Linear Regression
Faculty : Dr. R. Jothi
Due Date : 17/01/2024
Submit your python code (Jupyter notebook): with output for all the questions.
Regression analysis is one of the most important fields in statistics and machine
learning. There are many regression methods available. Linear regression is one
of them.
Q1. Suppose you are asked to build a machine learning model for predicting the
output of manufacturing machine based on its operational time.
Print all the predictor variables and dependent variables in the given
dataset (Machine.csv)
Understand the relationship between each predictor variable and the
dependent variable; draw the plot.
Implement linear regression algorithm with gradient descent
optimization. Print the regression parameters after 2 epochs of training.
Predict the output of the manufacturing if the machine runs for 13 hours.
Also print the error of your regression model.
Change the epochs and print the change in the model performance.
Use Sklearn model LinearRegression to solve the above problem and compare
results of your implementation with Sklearn model.
Q2. Consider house price prediction problem based on Use appropriate
Scikit/SKlearn Library function to apply linear regression on the given datasets
and compare the results with your implementation.
Print all the predictor variables and dependent variables in the given
dataset (housePrice_small.csv)
Understand the relationship between each predictor variable and the
dependent variable; Use heatmap to understand correlation between the
dependent and independent variables.
Keep 80% of samples for training and rest for testing
Print the regression parameters after training.
Show the accuracy on the test set.