















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Application of Rule-Based Classifier •^
A rule
r
covers
an instance
x
if the attributes of the instance
satisfy the condition
of the rule
R1: (Give Birth = no)
∧
(Can Fly = yes)
→
Birds
R2: (Give Birth = no)
∧
(Live in Water = yes)
→
Fishes
R3: (Give Birth = yes)
∧
(Blood Type = warm)
→
Mammals
R4: (Give Birth = no)
∧
(Can Fly = no)
→
Reptiles
R4: (Give Birth = no)
∧
(Can Fly = no)
→
Reptiles
R5: (Live in Water = sometimes)
→
Amphibians
Name The rule R1 covers a hawk => BirdThe rule R3 covers the grizzly bear => Mammal
Blood Type
Give Birth
Can Fly
Live in Water
Class
hawk
warm
no
yes
no
?
grizzly bear
warm
yes
no
no
?
Tid
Refund
Marital Status
Taxable Income
Class
Yes
Single
No
No
Married
No
No
Single
No
Yes
Married
No
No
Divorced
Yes
No
Married
No
Yes
Divorced
No
No
Single
Yes
No
Married
No
No
Single
Yes
10
(Status=Single)
→→→→
No
Coverage = 40%, Accuracy = 50%
Desiderata for Rule-Based Classifier •
Mutually exclusive rules^ – No two rules are triggered by the same record.– This ensures that every record is covered by
at most
one rule.
-^
Exhaustive rules^ –
There exists a rule for each combination of attribute values.
There exists a rule for each combination of attribute values.
at least
one rule.
Together these properties ensure that every record is covered byexactly one rule.
A simple covering algorithm
-^
Concentrates on one class at a time,disregarding what happens to the otherclasses.
-^
Generates a rule by adding tests (conditions) to the rule one by one that
space ofexamplesrule so farrule after adding new term
(conditions) to the rule one by one that maximize rule’s accuracy
.
-^
Each new test (growingthe rule) reduces rule’s coverage.
Selecting a test
-^
Goal: maximizing the accuracy of the rule on focus^ –
t : total number of instances covered by rule
p
: positive (correct) examples of the class covered by rule
Select a test that maximizes the ratio
p/t
-^
We are finished with an specific rule when–
p/t
= 1 or
left).
Example: contact lenses data
Accuracy
of
candidate rules
The numbers on the right show the fraction of “correct” instances inthe set singled out by that given condition.In this case, correct means that their recommendation is “hard.”
Modified rule and resulting data The rule isn’t very accurate, getting only
4
out of
12
that it covers.
So, it needs further refinement.
Modified rule and resulting data Should we stop here? Perhaps. But let’s say we are going for
exact
rules
, no matter how complex they become.
So, let’s refine further.
Further refinement
NOTE:
Tie between the first and the forth testWe choose the one with greater coverage