Giter Club home page Giter Club logo

us-census's Introduction

US Census Income Analysis

Predicting high / low salary band for a person based on US census data.

Python Environment

This repository uses Python 3.8.

The Python packages are stored in the env.yml file. These can be installed using conda by running:

conda env create -f env.yml

Workflow

There are three main pieces of this project:

  1. Exploratory Data Analysis.

  2. Data Processing

    • This handles all the loading, processing and transformations associated with the project.

    • Once executed it will run the following:

      a) Create a report of missing values within the raw dataset.

      b) Encode the salary threshold labels into a [0,1] format.

      c) One-hot encode and scale the relevant feature variables.

      d) Apply PCA-based dimensionality reduction (if requested)

      e) Split and Save the train and test datasets to a folder called data/processed/<tag>/.

python3 -m processing --tag my_baseline --use_pca False
  1. Modelling

    • This handles all of the model training and evaluation associated with this project.

    • Once executed it will run the following:

      a) Load the training and test datasets from the local storage data/processed/<data> folder.

      b) Fit the name --algo model to the dataset (see MODELS for a range of choices).

      c) Evaluate the training, validation and test performance and save the results to results/<tag>.json.

      d) Save the trained model under a directory called models/<tag>.pkl

python3 -m modelling --data baseline --algo Ridge --tag baseline_model

Code Formatting

This respository uses black and isort for code and package import formatting. To run these execute the following commands in the terminal;

  • black <file_name> or black . for all files.
  • isort <file_name> or isort . for all files.

us-census's People

Contributors

jackapbutler avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.