Skip to content

WHH-JULIET/House_Price_Prediction.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠 House Price Category Prediction using Logistic Regression

Python License: MIT Made with Scikit-learn

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.


πŸ“ Files

  • 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.

πŸ“Œ Price Category Mapping

Category Price Range
0 Below $300,000
1 $300,000 to $449,999
2 $450,000 and above

πŸ” Project Overview

This project includes the following steps:

  1. βœ… Load and inspect data
  2. 🏷️ Transform raw price into categorical classes
  3. βœ‚οΈ Split dataset into training and test sets
  4. πŸ€– Train a logistic regression model
  5. πŸ“Š Evaluate model performance (accuracy, confusion matrix, and classification report)
  6. πŸ“‰ Visualize actual vs. predicted price categories

🧠 Model

Algorithm: Logistic Regression (Multi-class)
Library: scikit-learn
Evaluation Metrics:

  • Accuracy
  • Precision, Recall, F1-score
  • Confusion Matrix

πŸ–₯️ How to Run

1. Clone the repository

git clone https://github.com/your-username/house-price-category-prediction.git
cd house-price-category-prediction

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published