of 14 houses that were sold in a small town in BC. The dataset is used to predict whether a new house in the same town will be sold in 10 days if listed
The following dataset is a historic record of 14 houses that were sold in a small town in BC. The dataset is used to predict whether a new house in the same town will be sold in 10 days if listed with a specific price based on certain attributes. We are considering only four attributes (price, number of bedrooms, size, and distance to bus stop) just to simplify the calculations in this assignment but more attributes should be considered in real applications.
Build a decision tree to predict whether a new house listing in the same town will be sold in 10 days based on the given attributes. Use ID3 algorithm.
To answer this question, you need to complete the following steps:
-
Calculate the entropy of the whole dataset
- After identifying the first attribute, repeat the same steps to identify the next attribute to split on in every leaf of the tree based on information gain analysis. Repeat this step until you complete the tree.
- Draw the final tree


Step by step
Solved in 3 steps
