Skip to main content

Median housing value prediction

The housing data can be downloaded from https://raw.githubusercontent.com/ageron/handson-ml/master/. The script has codes to download the data. We have modelled the median house value on given housing data.

The following techniques have been used:

  • Linear regression
  • Decision Tree
  • Random Forest

Steps performed

  • We prepare and clean the data. We check and impute for missing values.
  • Features are generated and the variables are checked for correlation.
  • Multiple sampling techinuqies are evaluated. The data set is split into train and test.
  • All the above said modelling techniques are tried and evaluated. The final metric used to evaluate is mean squared error.

Setup for development

Create conda environment

conda env create -f env.yml
conda activate <env_name>

Perform test

Tox have been configured with pytest to automate testing in virtualenv.

tox

Test a specific test file:

tox -- -k <file_name>

Usage

Install package

Option 1. From github:

git clone https://github.com/TejaML/mle-training.git
cd mle-training
pip install .

Option 2. From PyPi

pip install housing-prediction

Test installation:

To test whether the package is successfully installed or not, start python session, and try to import housing. If it's imported successfully, then installation is complete

python
>>> import housing

It will install all the dependencies and the housing package

Run scripts

There are two ways to run the scripts, as single command line tool and as python scripts.

  • As command line tool

    housing
    
  • As python scripts

python -m housing.ingest_data
python -m housing.train
python -m housing.score

You can also access pass arguments, to find all available arguments:

housing --help
python -m housing.ingest_data --help
python -m housing.train
python -m housing.score

Release files for housing-prediction-0.4 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for housing-prediction-0.4 0.4
File Size Uploaded
housing-prediction-0.4-0.4.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for housing-prediction-0.4 0.4
File Interpreter ABI Platform
housing_prediction_0.4-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 50.7 kB

Release files / housing-prediction-0.4-0.4.tar.gz

Download URL housing-prediction-0.4-0.4.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
29b86e3a6b40b4cd7c6fe7074f36b305e09e8288587c26c87f1ba18d39a26044
BLAKE2b-256 checksum
How to use checksums
72145b3b74bed560acfac4b63bc6511378cd305bf2b4b78f36bcca47c7235f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / housing_prediction_0.4-0.4-py3-none-any.whl

Download URL housing_prediction_0.4-0.4-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e78e3d652211600d38600d0f4b73b4a92f64fe705b0a6638d79d91dc8ac67564
BLAKE2b-256 checksum
How to use checksums
b818fc53180c1ea78e3ba8956c63b786d8b65a053f36801500c6d25fce8e7d4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page