0% found this document useful (0 votes)
52 views2 pages

Lab1 Linear Regression and Polynomial Regression

The document outlines a lab assignment for B.Tech. students in the School of Computer Science Engineering and Technology, focusing on implementing linear and polynomial regression models using the Boston Housing Dataset. Students are instructed to explore the data, prepare it for modeling, implement regression models using scikit-learn, evaluate their performance, and visualize the results. Additional practice questions are provided for further exploration of data analysis techniques.

Uploaded by

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

Lab1 Linear Regression and Polynomial Regression

The document outlines a lab assignment for B.Tech. students in the School of Computer Science Engineering and Technology, focusing on implementing linear and polynomial regression models using the Boston Housing Dataset. Students are instructed to explore the data, prepare it for modeling, implement regression models using scikit-learn, evaluate their performance, and visualize the results. Additional practice questions are provided for further exploration of data analysis techniques.

Uploaded by

vikrammadhad2446
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

School of Computer Science Engineering and Technology

Course - B.Tech. Semester – 4th


Course Code - CSET301 Course Name -
AIML
Year - 2025 Semester - Even

Max. Marks: 2

LAB ASSIGNMENT # 1 SET - 1

Objective
To provide hands-on experience to students in implementing and applying linear and polynomial
regression models and evaluating their performance.

Task Instructions

 Data set download


 Boston Housing Dataset: Predicting house prices based on 13 features.
 URL:
https://raw.githubusercontent.com/selva86/datasets/master/BostonHousing.csv
 Data Exploration
 Load the dataset into a DataFrame df.
 Print statistical values (mean, median, standard deviation, etc.) and the shape of
the data.
 Data Preparation:
 Separate the features into X and Y and print the shape.
 Split the dataset into training ‘df_train’ and testing ‘df_test’ set.
 Model Implementation using scikit-learn:

 Linear Regression: Implement a model to predict house prices.


 Polynomial Regression: Apply polynomial regression with degrees 2, 3, and 4.

 Performance Evaluation:
School of Computer Science Engineering and Technology

 Evaluate the performance of the implemented model using MSE, RMSE, MAE,
and R2 Score, etc.
 Visualization:
 Plot the regression line for both linear and polynomial regression models to compare
fits visually.

Additional Practice Questions (Not evaluated):

 Perform correlation analysis between features and target variables. Visualize using a
heatmap.
 Perform feature scaling (normalization, standardization) and observe accuracy variations.
 Train models using different train-test splits (60-40, 70-30, 90-10 etc.) and compare results.
 Shuffle training samples using different random seed values and observe model performance.

You might also like