Skip to content

SumanSekhar-Sahoo/House-Price-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏑 House Price Prediction with Linear Regression

A hands-on machine learning project to predict house prices based on features like living area, bedrooms, and bathrooms. Built using Python and shared on LinkedIn to showcase my journey in data science and ML 🎯

πŸ”— LinkedIn Post
Check out my project announcement and insights


πŸ“ Project Structure

β”œβ”€β”€ train.csv
β”œβ”€β”€ house_price_prediction.py
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
└── visuals/
└── actual_vs_predicted.png


πŸš€ Overview

  • Objective: Predict house sale prices using a Linear Regression model.
  • Dataset: Kaggle's "House Prices: Advanced Regression Techniques" (train.csv).
  • Features Used:
    • GrLivArea: Above grade living area (sq ft)
    • BedroomAbvGr: Number of bedrooms
    • FullBath: Number of full bathrooms
  • Target: SalePrice

πŸ’‘ Key Features

  • Data Cleaning: Handled missing values with mean imputation.
  • Exploratory Data Analysis (EDA): Visualized relationships between features and target.
  • Model Training: Trained a Linear Regression model using scikit-learn.
  • Evaluation: Assessed performance using Mean Squared Error (MSE) and RΒ² score.
  • Visualization: Generated scatter plot comparing actual vs predicted prices for interpretability.

πŸ› οΈ Tech Stack

Library Use Case
pandas Data loading & manipulation
numpy Numerical operations
matplotlib Plotting and visualization
seaborn Statistical visualizations
scikit-learn Machine learning & evaluation

πŸ“₯ Getting Started

  1. Clone the repository

    git clone https://github.com/SumanSekhar-Sahoo/House-Price-Prediction.git cd House-Price-Prediction

  2. Install dependencies

    pip install -r requirements.txt

  3. Download dataset

  4. Run the script

    python house_price_prediction.py

  5. View results

    • Printed MSE & RΒ² in terminal
    • A scatter plot comparing actual vs predicted prices will be displayed or saved to visuals/

πŸ“ˆ Sample Output

Mean Squared Error: 1.97e+09

RΒ² Score: 0.72

Figure_1

(Actual values may vary depending on data split)


βœ… Next Steps & Improvements

  • Add more advanced features and feature engineering
  • Experiment with regularized regression (Ridge, Lasso), tree-based models (Random Forest, XGBoost)
  • Deploy model as a web app using Flask, FastAPI, or Streamlit

πŸ“¬ Connect & Collaborate

Suman Sekhar Sahoo


πŸ“œ License

Distributed under the MIT License. See LICENSE for more details.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages