Uploaded by christos199704

ML Coursework 2

advertisement
ACSC 468: Machine Learning
Coursework 2
A farmer needs to decide whether or not to grow sweetcorn next year. He has a table
of data based on the experience of eight other farmers showing attributes for climate,
soil type and market demand, along with the outcome: whether or not the crop was
profitable.
Climate
Soil
Demand
Profitable?
Hot
Hot
Hot
Hot
Warm
Warm
Warm
Cold
Acid
Acid
Acid
Acid
Acid
Alkali
Alkali
Acid
High
Medium
Low
Low
Medium
Medium
Medium
Low
Yes
Yes
No
No
Yes
No
No
No
(a) What is the entropy of the above collection of examples?
(b) If S is the above collection of examples, what is Entropy(SClimate) (i.e. the entropy
of S if we know the value of the attribute Climate)?
(c) Run the ID3 algorithm on the above data and draw the resulting decision tree (no
pruning).
(d) The farmer has determined the following attribute values {Warm, Acid, Medium}.
According to your decision tree should he grow sweetcorn in these circumstances?
(e) What if the attribute Soil did not exist? Draw the resulting decision tree if the only
attributes available were Climate and Demand.
(f) Convert the tree you generated in (c) to rules.
Page 1 of 1
Download