This project demonstrates how machine learning algorithms can be utilized to predict house prices using multiple linear regression. By analyzing historical data, the model identifies relationships between various features of a house and its price, allowing for accurate predictions of future values.
- Machine Learning Application: Explore how machine learning algorithms help in predicting house prices.
- Dataset Usage: Utilize a small dataset for initial testing, with the capability to scale to larger, more complex datasets.
- Model Development: Build a predictive model using the
sklearn.linear_modelmodule.
The model can predict sale prices for the following properties:
- A house with 230 square meters, 4 rooms, and 10 years of building age.
- A house with 230 square meters, 6 rooms, and 0 years of building age (new building).
- A house with 355 square meters, 3 rooms, and 20 years of building age.
Multiple linear regression is a statistical technique used to model the relationship between one dependent variable and two or more independent variables.
The model is typically expressed as:
𝑌 = 𝛽0 + 𝛽1𝑋1 + 𝛽2𝑋2 + ... + 𝛽𝑛𝑋𝑛 + 𝜀
Where:
- 𝑌 is the dependent variable.
- 𝑋 is the independent variables.
- 𝛽 represents the coefficients.
- 𝜀 is the error term.
The primary goal is to predict the value of the dependent variable based on the values of the independent variables by minimizing the difference between the predicted and actual values.
Key assumptions include:
- Linearity
- Independence of errors
- Homoscedasticity (constant variance of errors)
- Normality of error terms
Widely used in various fields such as economics, social sciences, and real estate to analyze the influence of multiple factors on a single outcome.
- Predicts house prices based on area, number of rooms, and building age.
- Utilizes linear regression for analysis.
- User-friendly command-line interface for input.
- Python 3.x
- Pandas
- Scikit-learn
-
Clone the repository:
git clone https://github.com/yashmittalz/house-price-prediction.git cd house-price-prediction -
Install the required packages:
pip install pandas scikit-learn
-
Ensure you have the dataset
housepricesdataset.csvin theHouse Price Predictiondirectory.
-
Run the application using the following command:
python main.py
-
Follow the prompts to enter the area, number of rooms, and building age to receive a predicted house price.
Feel free to submit issues or pull requests if you have suggestions for improvements or new features.
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Yash Mittal. Version 1.0