For example, assume someFeature has three possible entries: A, B, or C. One-hot encoding creates a "dummy" variable for each possible category of each non-numeric feature. One popular way to convert categorical variables is by using the one-hot encoding scheme. Typically, learning algorithms expect input to be numeric, which requires that non-numeric features (called categorical variables) be converted. 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.įrom the table in Exploring the Data above, we can see there are several features for each record that are non-numeric.race: Black, White, Asian-Pac-Islander, Amer-Indian-Eskimo, Other.relationship: Wife, Own-child, Husband, Not-in-family, Other-relative, Unmarried.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.marital-status: Married-civ-spouse, Divorced, Never-married, Separated, Widowed, Married-spouse-absent, Married-AF-spouse.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.workclass: Private, Self-emp-not-inc, Self-emp-inc, Federal-gov, Local-gov, State-gov, Without-pay, Never-worked.The data we investigate here consists of small changes to the original dataset, such as removing the 'fnlwgt' feature and records with missing or ill-formatted entries. You can find the article by Ron Kohavi online. ![]() The datset was donated by Ron Kohavi and Barry Becker, after being published in the article "Scaling Up the Accuracy of Naive-Bayes Classifiers: A Decision-Tree Hybrid". The dataset for this project originates from the UCI Machine Learning Repository. ![]() While it can be difficult to determine an individual's general income bracket directly from public sources, we can (as we will see) infer this value from other publically available features. Understanding an individual's income can help a non-profit better understand how large of a donation to request, or whether or not they should reach out to begin with. This sort of task can arise in a non-profit setting, where organizations survive on donations. Your goal with this implementation is to construct a model that accurately predicts whether an individual makes more than $50,000. You will then choose the best candidate algorithm from preliminary results and further optimize this algorithm to best model the data. In this project, you will employ several supervised algorithms of your choice to accurately model individuals' income using data collected from the 1994 U.S. In addition, Markdown cells can be edited by typically double-clicking the cell to enter edit mode. Code and Markdown cells can be executed using the Shift + Enter keyboard shortcut. Note: Please specify WHICH VERSION OF PYTHON you are using when submitting this notebook. Your project submission will be evaluated based on your answers to each of the questions and the implementation you provide. Carefully read each question and provide thorough answers in the following text boxes that begin with 'Answer:'. Each section where you will answer a question is preceded by a 'Question X' header. In addition to implementing code, there will be questions that you must answer which relate to the project and your implementation. Please be sure to read the instructions carefully! Instructions will be provided for each section and the specifics of the implementation are marked in the code block with a 'TODO' statement. Sections that begin with 'Implementation' in the header indicate that the following block of code will require additional functionality which you must provide. Welcome to the second project of the Machine Learning Engineer Nanodegree! In this notebook, some template code has already been provided for you, and it will be your job to implement the additional functionality necessary to successfully complete this project.
0 Comments
Leave a Reply. |