0% found this document useful (0 votes)
17 views

Lab Assignment-2 Linear Regression

The document discusses linear regression and its implementation. It provides two questions - the first asks to build a machine learning model to predict manufacturing machine output based on operational time, using gradient descent optimization. The second asks to predict house prices using scikit-learn linear regression and analyze variable correlations and test accuracy.

Uploaded by

adityasingh.b9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Lab Assignment-2 Linear Regression

The document discusses linear regression and its implementation. It provides two questions - the first asks to build a machine learning model to predict manufacturing machine output based on operational time, using gradient descent optimization. The second asks to predict house prices using scikit-learn linear regression and analyze variable correlations and test accuracy.

Uploaded by

adityasingh.b9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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.

You might also like