For each class C
Initialize E to the instance set
While E contains instances in C
Create a rule R with an empty left-hand side (LFS) that predicts C
Until R is perfect (or no more attributes to use) do
For each attibute Ai not mentioned in R, and each value Vij
Check the accuaracy p/t
(t: total examples covered by Ai = Vij, and
p: positive examples covered by Ai = Vij)
Select the Ai = Vij that maximize p/t (and break ties by
choosing with the largest p)
Add A = Vij to R
Remove the examples covered by R from E
No & Fever & Cough & X-Ray & ESR & Auscultation & Disease
----------------------------------------------------------------
1 & high & heavy & flack & normal & bubblelike &
2 & medium & heavy & flack & normal & bubblelike &
3 & low & slight & spot & normal & dry-peep & Pneumonia
4 & high & medium & flack & normal & bubblelike &
5 & medium & slight & flack & normal & bubblelike &
----------------------------------------------------------------
6 & absent & slight & strip & normal & normal &
7 & high & heavy & hole & fast & dry-peep &
8 & low & slight & strip & normal & normal & Tuberculosis
9 & absent & slight & spot & fast & dry-peep &
10 & low & medium & flack & fast & normal &
--------------------------------------------------------------------
Day & Outlook & Temperature & Humidity & Windy & PlayTennis ------------------------------------------------------------ 1 & sunny & hot & high & weak & No 2 & sunny & hot & high & strong & No 3 & overcast & hot & high & weak & Yes 4 & rain & mild & high & weak & Yes 5 & rain & cool & normal & weak & Yes 6 & rain & cool & normal & strong & No 7 & overcast & cool & normal & strong & Yes 8 & sunny & mild & high & weak & No 9 & sunny & cool & normal & weak & Yes 10 & rain & mild & normal & weak & Yes 11 & sunny & mild & normal & strong & Yes 12 & overcast & mild & high & strong & Yes 13 & overcast & hot & normal & weak & Yes 14 & rain & mild & high & strong & No Q: (Outlook = sunny, Temperature = cool, Humidity = high, Wind = strong)