Decision tree - id3 algorithm, Data Structure & Algorithms

Assignment Help:

Decision Tree - ID3 algorithm:

Imagine you only ever do one of the following four things for any weekend:

  •   go shopping
  •   watch a movie
  •   play tennis
  •   just stay in

What you do depends on three factors:
 
1. weather (windy, rainy or sunny) 
 
2. how much money you have (rich or poor) 
 
3. whether your parents are visiting (yes or no) 
 
You say to yourself: if my parents are visiting, we'll go to the cinema. If they're not visiting and it's sunny, then I'll play tennis, and so on.
 
Suppose we have the following instances in our (training) dataset:
 
Weekend (Example) Weather Parents Money Decision (Category)

900_Decision Tree Computer Assignment.png

Apply the ID3 algorithm on this dataset to induce a decision tree. 
 
Note that I have written a function (readDataset.m) for reading the given dataset (MyWeekendDataset.txt) , you can use it to load the data and then write the algorithm. It is not necessary to show the decision tree graphically but please show the structure of the tree as well as you can.


Related Discussions:- Decision tree - id3 algorithm

What are expression trees, What are expression trees?  The leaves of an...

What are expression trees?  The leaves of an expression tree are operands, like as constants or variable names, and the other nodes have operators. This certain tree happens to

Multiplication, Implement multiple stacks in a single dimensional array. Wr...

Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

A Booth''s, Draw a flowchart of a Booth''s multiplication algorithm and exp...

Draw a flowchart of a Booth''s multiplication algorithm and explain it.

Pest control program, PART- Pest Control Program Prepare a Pest Contro...

PART- Pest Control Program Prepare a Pest Control Program for the facility that will address the management of Rodents, Insects and Birds. Your Pest Control Program should

How do you find the complexity of an algorithm, How do you find the complex...

How do you find the complexity of an algorithm?  Complexity of an algorithm is the measure of analysis of algorithm. Analyzing an algorithm means predicting the resources that

State the example of pre- and post-conditions, State the example of pre- an...

State the example of pre- and post-conditions Suppose that function f(x) should have a non-zero argument and return a positive value. We can document these pre- and post-condit

Algorithm, Define what an algorithm is and outline the characteristics of a...

Define what an algorithm is and outline the characteristics of a good algorithm.

Breadth-first search, Breadth-first search starts at a given vertex h, whic...

Breadth-first search starts at a given vertex h, which is at level 0. In the first stage, we go to all the vertices that are at the distance of one edge away. When we go there, we

Write Your Message!

Captcha
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