Machine Learning Decision Tree – Solved Problem (ID3 algorithm)

Note for the reader: Solving this Decision tree problem took 20 pages. as it is difficult to produce all the matter here, I have attached the solution in PDF document. Please download and check the solution.

Competition Description

Your goal is to find out when people will play outside through next week’s weather forecast. You find out that the reason people decide whether to play or not depends on the weather. The following table is the decision table for whether it is suitable for playing outside.

Data Description

idoutlooktemperaturehumiditywindplay
1sunnyhothighweakno
2sunnyhothighstrongno
3overcasthothighweakyes
4rainymildhighweakyes
5rainycoolnormalweakyes
6rainycoolnormalstrongno
7overcastcoolnormalstrongyes
8sunnymildhighweakno
9sunnycoolnormalweakyes
10rainymildnormalweakyes
11sunnymildnormalstrongyes
12overcastmildhighstrongyes
13overcasthotnormalweakyes
14rainymildhighstrongno

Course Design

Choose your own way and programming language to implement the decision tree algorithm (with code comments or notes). Divide the data in Data Description into training sets and test sets the get your answer.

Solution: I have followed ID 3 (Iterative Dichotomiser 3) Algorithm

We need to construct the Decision tree to predict whether people will play outside or not?

The following Dataset is given in the form of a table

idoutlooktemperaturehumiditywindplay
1sunnyhothighweakno
2sunnyhothighstrongno
3overcasthothighweakyes
4rainymildhighweakyes
5rainycoolnormalweakyes
6rainycoolnormalstrongno
7overcastcoolnormalstrongyes
8sunnymildhighweakno
9sunnycoolnormalweakyes
10rainymildnormalweakyes
11sunnymildnormalstrongyes
12overcastmildhighstrongyes
13overcasthotnormalweakyes
14rainymildhighstrongno

Note for the reader: Solving this Decision tree problem took 20 pages. as it is difficult to produce all the matter here, I have attached the solution in PDF document. Please download and check the solution.

Gopal Krishna

Hey Engineers, welcome to the award-winning blog,Engineers Tutor. I'm Gopal Krishna. a professional engineer & blogger from Andhra Pradesh, India. Notes and Video Materials for Engineering in Electronics, Communications and Computer Science subjects are added. "A blog to support Electronics, Electrical communication and computer students".

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »