Skip to content

Machine Learning Nanodegree Project Udacity. Investigated factors affecting likelihood of donations being made using real census data. Developed naive classifier to compare testing results. Trained & tested several supervised machine learning models on preprocessed census data to predict donation likelihood. Selected best model based on accuracy…

Notifications You must be signed in to change notification settings

Kareem100/Finding-Donors-for-CharityML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supervised Learning Project: Finding Donors for CharityML

Overview

In this project, i applied supervised learning techniques and an analytical mind on data collected for the U.S. census to help CharityML (a fictitious charity organization) identify people most likely to donate to their cause. I first explored the data to learn how the census data is recorded. Next, i applied a series of transformations and preprocessing techniques to manipulate the data into a workable format. I then evaluate several supervised learners of my choice on the data, and consider which is best suited for the solution. Afterwards, i optimizez the model I've selected and present it as my solution to CharityML. Finally, i explored the chosen model and its predictions under the hood, to see just how well it's performing when considering the data it's given.

Install

This project requires Python 3.x and the following Python libraries installed:

You will also need to have software installed to run and execute an iPython Notebook

I would recommend to install Anaconda, a pre-packaged Python distribution that contains all of the necessary libraries and software for this project.

Code

Template code is provided in the finding_donors.ipynb notebook file. You will also be required to use the included visuals.py Python file and the census.csv dataset file. Note that the code included in visuals.py is meant to be used out-of-the-box and not intended to manipulate. If you are interested in how the visualizations are created in the notebook, please feel free to explore this Python file.

Run

In a terminal or command window, navigate to the top-level project directory finding_donors/ (that contains this README) and run one of the following commands:

ipython notebook finding_donors.ipynb

or

jupyter notebook finding_donors.ipynb

This will open the iPython Notebook software and project file in your browser.

Data

The modified census dataset consists of approximately 32,000 data points, with each datapoint having 13 features. This dataset is a modified version of the dataset published in the paper "Scaling Up the Accuracy of Naive-Bayes Classifiers: a Decision-Tree Hybrid", by Ron Kohavi. You may find this paper online, with the original dataset hosted on UCI.

Features

  • age: Age
  • workclass: Working Class (Private, Self-emp-not-inc, Self-emp-inc, Federal-gov, Local-gov, State-gov, Without-pay, Never-worked)
  • education_level: Level of 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: Number of educational years completed
  • marital-status: Marital status (Married-civ-spouse, Divorced, Never-married, Separated, Widowed, Married-spouse-absent, Married-AF-spouse)
  • occupation: Work 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: Relationship Status (Wife, Own-child, Husband, Not-in-family, Other-relative, Unmarried)
  • race: Race (White, Asian-Pac-Islander, Amer-Indian-Eskimo, Other, Black)
  • sex: Sex (Female, Male)
  • capital-gain: Monetary Capital Gains
  • capital-loss: Monetary Capital Losses
  • hours-per-week: Average Hours Per Week Worked
  • native-country: 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)

Target Variable

  • income: Income Class (<=50K, >50K)

Evaluation

The Project was Evaluated against the Finding Donors for CharityML Udacity project rubric...

References

Copyrights

  • Kareem S. Fathy
  • Udacity Platform

About

Machine Learning Nanodegree Project Udacity. Investigated factors affecting likelihood of donations being made using real census data. Developed naive classifier to compare testing results. Trained & tested several supervised machine learning models on preprocessed census data to predict donation likelihood. Selected best model based on accuracy…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published