Implement the id3 algorithm to classify adults

Assignment Help Computer Engineering
Reference no: EM132109300

Project 3: Decision Trees

You are going to implement the ID3 algorithm to classify adults into two income brackets

. Each line of the file looks like this: workclass, education, marital-status, occupation, relationship, race, sex, native-country, class-label

Using the provided stub file, implement a decision tree classifier using the ID3 algorithm (see the slides or the book). You should implement the train() function before the classify() function.

These two functions are required as written in order to test your code. You are free to implement a decision tree however you wish, as long as you write the algorithm from scratch.

Also, be sure not to edit the function signatures, or you will break the tests. You can write any extra functions that you deem necessary. Do not use premade packages such as scikit-learn.

We have provided a convert() function that turns each attribute vector into an integer vector. Please base the decisions in your model on the values of these integers, not the categorical values themselves. Both train() and classify() will be passed integer attribute vectors during tests on Mimir.

Notes: The value "Never-worked" of attribute workclass is removed from the training set when it is groomed of unknown values ("?"). If someone has never worked, then we don't know what their occupation is.

The Program must be done in python

Reference no: EM132109300

Questions Cloud

Describe at least two things you would have changed : Describe at least two things you would have changed concerning the above project tools, technology, approaches, and/or methodology used.
Design a simple 2d scene with an object which you can move : equired Functionality Here are the elements that your program must have. Despite this "list" of requirements, there is a lot of room for creativity!
Design a firmware that can perform and result on leds only : Take input number "A" ranging (0-F) through serial port, store it in a variable and display it on SSD in form of BCD and on LEDs in form of binary.
Calculate the number of days in the month desired : Your project will calculate the number of days in the month given the desired month and year.
Implement the id3 algorithm to classify adults : Each line of the file looks like this: workclass, education, marital-status, occupation, relationship, race, sex, native-country, class-label.
What exactly is a configuration change management policy : What exactly is a configuration change management policy, and how should you address this for my project?
Develop for the operational manager of the indicated firm : ITECH1103- Big Data and Analytics - ANALYTIC REPORT - Write a description of the selected dataset and project, and its importance for the firm.
Build a gui that facilitates playing one round : Build a GUI (graphical user interface) that facilitates playing one round (13 hands).
Define the objects and their functions : The Launcher will fire a projectile at a target the Launcher is static, the projectile follows a linear path. The projectile has a known velocity.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Develop two use case scenarios for it

Pretend that you have been charged with the task of redesigning a Web site that sells some retail products (books, music, clothes, etc)

  Implementing stringed musical instrument class

Generate a Java test class which simulates utilizing your instrument class. a) Construct 10 examples of your instrument, b) tune your instruments, c) Start playing your instrument, d) Call your unique method, and e) Stop playing your instruments.

  Write program using array that asks user to input 10 numbers

Write a program using array that asks user to input 10 numbers, then calculates the average of those numbers and finds out the total number that is greater or equal to the average.

  Data planning and modelling– enterprise modelling

Write down the major differences between the two approaches to the data planning and modelling– enterprise modelling and the view integration?

  Calculate total distance traveled

Calculate total distance traveled, total gas consumed (gallons), MPG over the past 5 minutes, and cumulative MPG.

  What is a multicore processor

What is a multicore processor? What are its advantages compared with multiple-processor architecture?

  Why using euler''s method is the simplest numerical method

This is being solved by computer code in c++ to obtain numerical approx to ODE. Using Euler's method is the simplest numerical process for approximation solving initial value ODE'S.

  What would be your recommendation for future improvement

For the last written assignment for this course, I would like to do a little introspection. I would like you to write a 3 page report.

  What is the maximum number of instructions

What is the maximum number of instructions you can expect to be able to use in the program that processes the data? Keep in mind that your applications program must share memory with the operating system and with your data.

  What is the lifetime of the process

What is the lifetime of the process?What is the utilization percentage of the CPU?

  Write a gui-based program that manages an auction of several

Write a GUI-based program that manages an auction of several items.

  Write a function called countlines that takes a string

Write a function called countLines() that takes a string representing the name of a file as a parameter, & a string representing a word as the second parameter.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd