Back to the 2026 paper

Module 3: Linear Classification and Advanced Methods

20267m

Using the ID3 algorithm, construct a decision tree for the given dataset: Outlook, Temperature, Humidity, Wind, Play. Rows: Sunny, Hot, High, Weak, No; Sunny, Mild, High, Strong, No; Overcast, Hot, High, Weak, Yes; Rain, Mild, High, Weak, Yes; Rain, Cool, Normal, Weak, Yes; Rain, Cool, Normal, Strong, No; Overcast, Cool, Normal, Strong, Yes; Sunny, Cool, Normal, Weak, Yes; Sunny, Mild, Normal, Weak, Yes; Rain, Mild, Normal, Weak, Yes.

Worked SolutionAI Assisted

ID3 decision tree

ID3 selects the attribute with the highest information gain, where entropy is (H(S)=-\sum_c p_c\log_2p_c). For this dataset, Outlook is a useful root: Overcast rows are all Yes; the Sunny rows separate by Humidity; the Rain rows separate by Wind.

MermaidDiagram
Rendering diagram…

The tree correctly classifies all listed training rows. ID3 is greedy: it chooses the best immediate information gain at each step and can overfit without pruning or suitable stopping rules.

Similar questions

MACHINE LEARNINGApply the ID3 algorithm on the following data to draw a decision tree. Show the Information Gain at each split. ### Dataset | Outlook | Temperature | Humidity | Windy | PlayTennis | |-----------|-------------|----------|-------|-------------| | Sunny | Hot | High | False | No | | Sunny | Hot | High | True | No | | Overcast | Hot | High | False | Yes | | Rainy | Mild | High | False | Yes | | Rainy | Cool | Normal | False | Yes | | Rainy | Cool | Normal | True | No | | Overcast | Cool | Normal | True | Yes | | Sunny | Mild | High | False | No | | Sunny | Cool | Normal | False | Yes | | Rainy | Mild | Normal | False | Yes | | Sunny | Mild | Normal | True | Yes | | Overcast | Mild | High | True | Yes | | Overcast | Hot | Normal | False | Yes | | Rainy | Mild | High | True | No |202510mData MiningDraw decision tree for the following data sets. Use entropy as a node selection mechanism: | Outlook | Temp (F) | Humidity | Windy | Class | |:---|:---|:---|:---|:---| | Rainy | Hot | High | False | No | | Rainy | Hot | High | True | No | | Overcast | Hot | High | False | Yes | | Sunny | Mild | High | False | Yes | | Sunny | Cool | Normal | False | Yes | | Sunny | Cool | Normal | True | No | | Overcast | Cool | Normal | True | Yes | | Rainy | Mild | High | False | No | | Rainy | Cool | Normal | False | Yes | | Sunny | Mild | Normal | False | Yes | | Rainy | Mild | Normal | True | Yes | | Overcast | Mild | High | True | Yes | | Overcast | Hot | Normal | False | Yes | | Sunny | Mild | High | True | No |202014mArtificial intelligenceConstruct a simple decision tree from the given dataset: | Weather | Temp | Play? | |---|---|---| | Sunny | Hot | No | | Sunny | Cool | Yes | | Rainy | Cool | Yes | | Rainy | Hot | No | Explain your attribute selection criteria.20247mMACHINE LEARNINGFor the Sun Burn data set given below, construct a decision tree. | Name | Hair | Height | Weight | Location | Class | |--------|--------|----------|---------|----------|-------| | Sunita | Blonde | Average | Light | No | Yes | | Anita | Blonde | Tall | Average | Yes | No | | Kavita | Brown | Short | Average | Yes | No | | Sushma | Blonde | Short | Average | No | Yes | | Xavier | Red | Average | Heavy | No | Yes | | Balaji | Brown | Tall | Heavy | No | No | | Ramesh | Brown | Average | Heavy | No | No | | Sweta | Blonde | Short | Light | Yes | No |202314m
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.