Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code a decision tree using the ID3 algorithm . It should run the following way: python decision.py train_file.csv will have some number of lines with

Code a decision tree using the ID3 algorithm . It should run the following way:

python decision.py

train_file.csv will have some number of lines with some number feature values seperated by commas, followed by a label. So for example [1, 1] with label 0 and [2,3] with label 1 would look like this:

1,1,0

2,3,1

This is your training set. The test_file.csv will simply have one line, the feature vector to be predicted. A file with the vector [1,2] will look like this:

1,2

Your program should print out the classification for the vector in test_file.csv.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

=+2. What is the difference between brand voice and tone?

Answered: 1 week ago