This repository contains Python code for comparing the performance of a Decision Tree Regressor and a Linear Regression model on a dataset.
This project aims to evaluate the effectiveness of two different machine learning models, a Decision Tree Regressor and a Linear Regression model, on a given dataset. The models are trained, evaluated using metrics like Mean Squared Error (MSE), Mean Absolute Error (MAE), and R-squared score, and compared based on their performance.
To run the code in this repository, follow these steps:
-
Clone the repository:
git clone https://github.com/KanishkThamman/India-Housing cd India-Housing
-
Install the required dependencies: Ensure you have Python installed. Install necessary libraries using pip:
pip install pandas matplotlib scikit-learn
-
Run the Jupyter Notebook or Python script: Execute the main script or open the Jupyter Notebook:
jupyter notebook main.ipynb
- Modify the dataset path or data loading code in the notebook/script (
main.ipynb
) to use your own dataset. - Adjust hyperparameters or add more models for comparison as needed.
- Run cells sequentially to train models, tune hyperparameters, evaluate performance, and visualize results.
main.ipynb
: Jupyter Notebook containing Python code for model training, hyperparameter tuning, evaluation, and visualization.README.md
: This file, providing an overview of the project and instructions for usage.House Price India.csv
: This file provides the data.
- Achieved an R-squared score of 0.2.
- Hyperparameters optimized using GridSearchCV.
- Visualized decision tree structure.
- Achieved an R-squared score of 0.5 (update with your actual score).
- Provided a baseline comparison against the Decision Tree model.
This project is licensed under the MIT License