Decision tree - id3 algorithm, Data Structure & Algorithms

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.

Posted Date: 2/12/2013 1:31:47 AM | Location : United States







Related Discussions:- Decision tree - id3 algorithm, Assignment Help, Ask Question on Decision tree - id3 algorithm, Get Answer, Expert's Help, Decision tree - id3 algorithm Discussions

Write discussion on Decision tree - id3 algorithm
Your posts are moderated
Related Questions
In the earlier unit, we have discussed about the arrays. Arrays are data structures of fixed size. Insertion & deletion involves reshuffling of array elements. Thus, arraymanipulat

Explain an efficient and effective way of storing two symmetric matrices of the same order in the memory. A n-square matrix array will be symmetric if a[j][k]=a[k][j] for all j

Methods of Collision Resolution 1)  Collision Resolution by separate chaining  2)  Collision Resolution by open addressing

In this example, suppose the statements are simple unless illustrious otherwise. if-then-else statements if (cond) { sequence of statements 1 } else { sequence of st

Task If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your

Now, consider a function that calculates partial sum of an integer n. int psum(int n) { int i, partial_sum; partial_sum = 0;                                           /* L

what is folding method?

What do we mean by algorithm? What are the characteristics of a good and relevant algorithm? An algorithm is "a step-by-step procedure for finishing some task'' An algorithm c

differences between direct and indirect recursion

Write an algorithm in form of a flowchart that takes temperatures input over a 100 day period (once per day) and outputs the number of days when temperature was below 20C and numbe