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

icon
Related questions
Question

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:

  1. Calculate the entropy of the whole dataset

  2. 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.
  3. Draw the final tree
House
House 1
House 2
House 3
House 4
House 5
House 6
House 7
House 8
Price
$300,000
$300,000
$250,000
$350,000
$350,000
$350,000
$250,000
$300,000
ممممممه
Number of Bedrooms
1
1
1
2
3
3
3
2
Size (sqft) Distance to Bus-Stop House sold in 10 days?
3,500 sqft
far
No
3,500 sqft
No
3,500 sqft
Yes
3,500 sqft
Yes
Yes
No
Yes
No
5,000 sqft
5,000 sqft
5,000 sqft
3,500 sqft
near
far
far
far
near
near
far
Transcribed Image Text:House House 1 House 2 House 3 House 4 House 5 House 6 House 7 House 8 Price $300,000 $300,000 $250,000 $350,000 $350,000 $350,000 $250,000 $300,000 ممممممه Number of Bedrooms 1 1 1 2 3 3 3 2 Size (sqft) Distance to Bus-Stop House sold in 10 days? 3,500 sqft far No 3,500 sqft No 3,500 sqft Yes 3,500 sqft Yes Yes No Yes No 5,000 sqft 5,000 sqft 5,000 sqft 3,500 sqft near far far far near near far
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions