Skip to main content

Sample code for coding practice

Project description

README.md

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.

To execute the script

python nonstandardcode.py

To activate conda environment

conda activate mle-dev

To create environment from yml file

conda env create --name mle-dev --file=env.yml

Command to install isort in conda environment

conda install isort

Command to install black in conda environment

conda install black

Command to install flake8 in conda environment

conda install flake8

Command to refactor python code with isort

isort nonstandardcode.py

Command to refactor python code with black

black nonstandardcode.py

Command to refactor python code with flake8

flake8 nonstandardcode.py

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

housing_library_5494-0.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

housing_library_5494-0.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file housing_library_5494-0.1.tar.gz.

File metadata

  • Download URL: housing_library_5494-0.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for housing_library_5494-0.1.tar.gz
Algorithm Hash digest
SHA256 dfb42d7da6b35c1fdd48002e9a64434935b892dddba0fd21fe73793489788548
MD5 ff8f5adaa90acff7581a6151589e8923
BLAKE2b-256 be7b025faaaec5ff7ba60b128f2f5a86f3b3ce05310a70355dbd19953291d2ae

See more details on using hashes here.

File details

Details for the file housing_library_5494-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for housing_library_5494-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c77422559c6881ba76b1410173324842e9f1636127551f7b00562458f7088b3a
MD5 b0e4f3d281a9c643f03781fec69c2130
BLAKE2b-256 063c04711fe5684404832f263606c2b4615db14cd88ebe7bb74c75c96eeaccd6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page