Skip to content

aivinay/predict_housing_price

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Predict Housing Price

A small pure-Python demo project that trains a linear regression model on sample housing data and predicts house prices from common features.

Features

  • Loads sample data from CSV
  • Trains a linear regression model without external dependencies
  • Predicts prices from a command-line interface
  • Includes unit tests for the model and data loading code

Quick Start

python3 -m venv .venv
source .venv/bin/activate
python -m unittest discover
python predict.py --sqft 1800 --bedrooms 3 --bathrooms 2 --age 12

Example output:

Estimated price: $367,000

Project Layout

predict_housing_price/
├── data/
│   └── sample_housing.csv
├── housing_price/
│   ├── __init__.py
│   ├── data.py
│   └── model.py
├── tests/
│   └── test_model.py
├── predict.py
└── README.md

Model

The model uses ordinary least squares linear regression. It adds an intercept term automatically and solves the normal equation with a small ridge fallback if the matrix is singular.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages