Skip to main content

A package for modules required for the Median housing value prediction

Project description

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.

Folders available and what's in them

  • artifacts
    • It stores the temporary data required for the code
  • datasets
    • It contains the raw housing data which is cleaned and used for codes
  • dist
    • It contains the files neccessary to install packages made from this code
  • docs
    • It contains the documentation of this project
  • logs
    • It contains the logs for the basic codes
  • notebook
    • It contains all the .pynb file
  • src
    • It contains the codes for the project
  • test
    • It contains the test codes to verify all files and folders are present

How to run the code

  • Open miniconda prompt

  • Change directory to project folder

  • Type the below line to replicate and use the environment created

    • conda env create --file env.yml
    • conda activate mle-dev
  • Type the below line to install package

    • pip install dist/median_housing_value_prediction-0.3-py3-none-any.whl
  • To test the installation, follow the below steps

    • Change directory to test/
    • Execute below codes to check if the packages and files are all available
      • pytest -v
  • Now change directory to src/

  • To open it with jupyter notebook, just o to project folder and type the following in the prompt

    • jupyter notebook Then copy the url from the prompt into a web browser to use jupyter notebook
  • To check flow of the code using mlflow, follow the below steps

    • Open a new miniconda prompt and change directory to the project folder
    • Activate the conda environment mle-dev
    • Now paste the below script to run the server
      • mlflow server --backend-store-uri mlruns/ --default-artifact-root mlruns/ --host localhost --port 5000
    • After running the command, open your browser and paste the url created on the miniconda prompt. Now you may see the UI of Mlflow.
    • Open a new miniconda prompt and change directory to the scripts folder under project folder
    • Activate the conda environment mle-dev
    • Run the main.py file by running the below command
      • python main.py
    • Wait for a few minutes, and after the code runs successfully, you can check at the directory described in the prompt for the parameters and metrics (or) you can refresh the website and check the recent run to check for result

Project details


Release history Release notifications | RSS feed

This version

0.3

Download files

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

Source Distribution

custom_functions-0.3.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

custom_functions-0.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file custom_functions-0.3.tar.gz.

File metadata

  • Download URL: custom_functions-0.3.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for custom_functions-0.3.tar.gz
Algorithm Hash digest
SHA256 12dddcfe43d3f9362c0e84bb61194b45ec2050ae30e7653a652a593cd51317ed
MD5 e708fa9c62882fc9015e50c0cc474029
BLAKE2b-256 b3d708db775a819a8c19de5078d77fa53cc60dd3f42f750d6846664e3389c2a6

See more details on using hashes here.

File details

Details for the file custom_functions-0.3-py3-none-any.whl.

File metadata

  • Download URL: custom_functions-0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for custom_functions-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 df3249beea984054ad65237ae3129f0725d9fd597ee8bcf57fc0465e27244da8
MD5 45c69ecee01704dd2ffc8289f0a8c07e
BLAKE2b-256 c9b5abb9a859497ddeb32ea4d09fab7d53836722e82155447d7997ac4844e7e3

See more details on using hashes here.

Supported by

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