Assignment
Assignment
1. Project Goal
The goal of this project is to build a machine learning model capable of accurately predicting
housing prices in the Boston area based on various socioeconomic and physical attributes of
the neighborhood. The dataset used for this project, known as the Boston Housing Dataset,
provides insights into how different factors like crime rate, average rooms per dwelling,
accessibility to highways, and more, influence the cost of homes in Boston.
3. Dataset Description
The Boston Housing Dataset is a well-known dataset in the field of machine learning. It
contains 506 samples with 13 features and one target variable:
● Handling Missing Values: The Boston dataset may have missing or NaN values that
can disrupt model training. Rows with missing data are removed or imputed if necessary.
● Feature Scaling: To standardize the data, features are scaled using StandardScaler.
This ensures that all input variables contribute equally to the prediction.
● Train-Test Split: The data is split into training (80%) and testing (20%) sets, allowing
us to evaluate model performance on unseen data.
Selecting relevant features ensures that only influential attributes are included in the model,
reducing noise and improving accuracy.
7. Hyperparameter Tuning
The model’s performance was optimized by fine-tuning hyperparameters:
Conclusion
This project demonstrates how machine learning can be applied to regression tasks like
predicting housing prices. By leveraging the Random Forest Regressor, we achieved reliable
predictions of Boston housing prices, highlighting the importance of careful data preprocessing,
feature selection, and hyperparameter tuning to enhance model accuracy and generalization.