Data Preprocessing Data preprocessing is a crucial step in any machine learning project. In this code, we load the housing dataset from a CSV file and perform the following data preprocessing tasks:
Checking for and removing duplicate entries Encoding categorical features using LabelEncoder Exploratory Data Analysis Exploratory Data Analysis (EDA) is essential for understanding the dataset's characteristics and relationships. We visualize the dataset's correlation using a heatmap to identify the relationships between different features.
Model Building The core of the project is building a Linear Regression model to predict housing prices. We split the dataset into training and testing sets and use the Linear Regression model to make predictions. We evaluate the model's performance using R-squared (R2) and Mean Absolute Error (MAE) metrics.
Results The project provides the following results:
R-squared (R2) score: A measure of how well the model fits the data. Mean Absolute Error (MAE): A measure of the average absolute difference between actual and predicted prices.