A simple and clean Python project that predicts house prices based on features like area, number of bedrooms, bathrooms, stories, and parking. It is a real world problem that requires various concepts from the course Fundamentals of AI/ML such as Linear Regression.
This project uses Linear Regression to predict house prices in India (in Rs).
- It trains on real house data from data.csv
- Shows actual vs predicted prices in a clean table
- Displays a visual comparison graph
- Loads and cleans the dataset automatically
- Trains a Linear Regression model
- Predicts house prices
- Shows first 100 predictions with original full prices
- Displays a scatter plot comparing actual vs predicted prices (in Lakhs)
You need to have these installed:
- Python 3.8 or higher
- The following libraries:
pandas scikit-learn matplotlib
-
Clone or download this repository.
-
Open the folder in Visual Studio Code.
-
Make sure both files are in the same folder: Main.py data.csv
-
Open the Python file and run it
You will see:
- A message saying how many rows were loaded
- A table with Actual Price vs Predicted Price (first 100 rows)
- A scatter plot comparing actual vs predicted prices (in lakhs)
- data.csv → House price dataset
- Main.py → Main Python script with full comments to increase the readability of the code for a even a beginner
- README.md → File that gives the whole description about this project (This file)
- Black dots = Actual house prices
- Orange stars = Predicted prices
- Python
- Pandas (data handling)
- Scikit-learn (Linear Regression)
- Matplotlib (visualization)
Feel free to explore, run it yourself and suggest improvements.
MADE BY PROTYUSH MITRA 25BAI10024