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

Explain complexity of an algorithm, Complexity of an Algorithm An algo...

Complexity of an Algorithm An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorith

Binary search, Explain binary search with an example

Explain binary search with an example

Relative and direct files, Each data record contains a fixed place in a rel...

Each data record contains a fixed place in a relative file. Each record ought to have associated with it in integer key value which will help identify this slot. Therefore, this ke

Explain arrays, Arrays :- To execute a stack we need a variable called top,...

Arrays :- To execute a stack we need a variable called top, that holds the index of the top element of stack and an array to hold the part of the stack.

General, whats the definition of ADT and data type?

whats the definition of ADT and data type?

Write an algorithm to input number of passengers travelling, There are ten ...

There are ten stations on a railway line: Train travels in both directions (i.e. from 1 to 10 and then from 10 to 1).  Fare between each station is $2. A passenger input

Red black tree, red black tree construction for 4,5,6,7,8,9

red black tree construction for 4,5,6,7,8,9

Binary search tree, Objectives The purpose of this project is to give yo...

Objectives The purpose of this project is to give you significant exposure to Binary Search Trees (BST), tree traversals, and recursive code. Background An arbitrary BST i

Array implementation of lists, In the array implementation of the lists, we...

In the array implementation of the lists, we will use the array to hold the entries and a separate counter to keep track of the number of positions are occupied. A structure will b

Program, What is a first-in-first-out data structure ? Write algorithms to...

What is a first-in-first-out data structure ? Write algorithms to perform the following operations on it – create, insertion, deletion, for testing overflow and empty conditions.

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