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.