Decision Tree - ID3 algorithm:
Imagine you only ever do one of the following four things for any weekend:
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)
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.