Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

ML Assignment-1

1)Illustrate decision trees to represent the following boolean functions:


(a) A ˄˜B
(b) A V [B ˄ C]
(c) A XOR B
(d) [A ˄ B] v [C ˄ D]

2)Build a decision tree using ID3 algorithm for the given training data in the
table (Buy Computer data), and predict the class of the following new
example: age<=30, income=medium, student=yes, credit-rating=fair

age income student Credit rating Buys compute


r

<=30 high no fair no

<=30 high no excellent no

31…40 high no fair yes

>40 medium no fair yes

>40 low yes fair yes

>40 low yes excellent no

31…40 low yes excellent yes

<=30 medium no fair no

<=30 low yes fair yes

>40 medium yes fair yes

<=30 medium yes excellent yes

31…40 medium no excellent yes

31…40 high yes fair yes

>40 medium no excellent no

You might also like