Coder Social home page Coder Social logo

afcarl / predict-if-salary-is-over-50k-with-keras Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guillaume-chevalier/predict-if-salary-is-over-50k-with-keras

0.0 0.0 0.0 1.27 MB

Predict whether income exceeds $50K/yr based on census data of the "Adult Dataset". Also known as "Census Income" dataset.

Jupyter Notebook 100.00%

predict-if-salary-is-over-50k-with-keras's Introduction

Predict if salary is >50k with Keras (machine learning)

A neural network with two layers (sigmoid activation) is used to predict if someone makes more than 50k or less based on training and test data from the UCI Machine Learning Repository.

Percentage right: 85.333% on 16281 test entries on which we did not trained the neural network. Therefore, the error is of 14.667%.

Dependencies

  • Python 3.0 (Anaconda distribution is preferred),
  • Theano (requires linux),
  • Keras (requires Theano),
  • iPython notebook (included in Anaconda bundle, run ipython notebook in terminal from the project's directory).

Comparison with other regression methods on the dataset

Algorithm Error (%)
My neural network 14.67
C4.5 15.54
C4.5-auto 14.46
C4.5 rules 14.94
Voted ID3 (0.6) 15.64
Voted ID3 (0.8) 16.47
T2 16.84
1R 19.54
NBTree 14.10
CN2 16.00
HOODG 14.82
FSS Naive Bayes 14.05
IDTM (Decision table) 14.46
Naive-Bayes 16.12
Nearest-neighbor (1) 21.42
Nearest-neighbor (3) 20.35
OC1 15.04
Pebls Crashed.

Dataset's structure

2 Outputs (classification)

  • >50K,
  • <=50K.

14 Inputs (string and continuous)

  • age: continuous.
  • workclass: Private, Self-emp-not-inc, Self-emp-inc, Federal-gov, Local-gov, State-gov, Without-pay, Never-worked.
  • fnlwgt: continuous.
  • education: Bachelors, Some-college, 11th, HS-grad, Prof-school, Assoc-acdm, Assoc-voc, 9th, 7th-8th, 12th, Masters, 1st-4th, 10th, Doctorate, 5th-6th, Preschool.
  • education-num: continuous.
  • marital-status: Married-civ-spouse, Divorced, Never-married, Separated, Widowed, Married-spouse-absent, Married-AF-spouse.
  • occupation: Tech-support, Craft-repair, Other-service, Sales, Exec-managerial, Prof-specialty, Handlers-cleaners, Machine-op-inspct, Adm-clerical, Farming-fishing, Transport-moving, Priv-house-serv, Protective-serv, Armed-Forces.
  • relationship: Wife, Own-child, Husband, Not-in-family, Other-relative, Unmarried.
  • race: White, Asian-Pac-Islander, Amer-Indian-Eskimo, Other, Black.
  • sex: Female, Male.
  • capital-gain: continuous.
  • capital-loss: continuous.
  • hours-per-week: continuous.
  • native-country: United-States, Cambodia, England, Puerto-Rico, Canada, Germany, Outlying-US(Guam-USVI-etc), India, Japan, Greece, South, China, Cuba, Iran, Honduras, Philippines, Italy, Poland, Jamaica, Vietnam, Mexico, Portugal, Ireland, France, Dominican-Republic, Laos, Ecuador, Taiwan, Haiti, Columbia, Hungary, Guatemala, Nicaragua, Scotland, Thailand, Yugoslavia, El-Salvador, Trinadad&Tobago, Peru, Hong, Holand-Netherlands.

Note: some data contain "?", so this value is possible for each of those 14 input fields

Presentation's slides

The slides of the seminar are available here (in French).

References

Dataset infos

Source:

Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.

predict-if-salary-is-over-50k-with-keras's People

Contributors

guillaume-chevalier 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.