A machine learning project that classifies synthetic house prices into categories using Logistic Regression. It uses features such as area, number of bedrooms, and bathrooms to predict whether a house falls into a low, medium, or high price range.
synthetic_house_data.csv: The synthetic dataset used for training and testing.Houseprice_prediction.py: The main Python script for training, prediction, and visualization.README.md: Project documentation.
| Category | Price Range |
|---|---|
| 0 | Below $300,000 |
| 1 | $300,000 to $449,999 |
| 2 | $450,000 and above |
This project includes the following steps:
- β Load and inspect data
- π·οΈ Transform raw price into categorical classes
- βοΈ Split dataset into training and test sets
- π€ Train a logistic regression model
- π Evaluate model performance (accuracy, confusion matrix, and classification report)
- π Visualize actual vs. predicted price categories
Algorithm: Logistic Regression (Multi-class)
Library: scikit-learn
Evaluation Metrics:
- Accuracy
- Precision, Recall, F1-score
- Confusion Matrix
git clone https://github.com/your-username/house-price-category-prediction.git
cd house-price-category-prediction