Code Monkey home page Code Monkey logo

ml-census-income's Introduction

ML-Census-Income

Using machine learning algorithms on the Census Income dataset

Requirements

  • Python 3.5 and up
  • Sci-kit Learn 0.17.1 and up
  • Numpy 1.13.1 and up
  • Pandas 0.20.3 and up

File Descriptions

data_preprocessing.py: Load, normalize, and process the train/test data.

train_and_test.py: Train a machine learning algorith (either naive-bayes, knn, decision tree, or svm) on the census income data to predict whether income exceeds $50k per year.

Data

The data used is from the UCI Machine Learning Repository and can be found here. For the program to run properly make sure the train and test data are titled "train_data.txt" and "test_data.txt" respectively and are both in a folder titled "data" that is in the same directory as both python files.

Usage

From terminal/command prompt navigate to the directory where data_preprocessing.py, train_test.py, and data are located and run one of the following commands.

python -c naive_bayes

python -c decision_tree

python -c knn

python -c svm

Note: If no classifier is provided then it defaults to naive bayes.

ml-census-income's People

Stargazers

 avatar

Watchers

 avatar  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.