View
228
Download
6
Embed Size (px)
Citation preview
CHAPTER 8
Decision MakingCS267
BY
GAYATRI BOGINERI (12)&
BHARGAV VADHER (14)October 22, 2007
Outline of the chapter
IntroductionCore and ReductSimplification of Decision TableDecision AlgorithmDegree of Dependency
Introduction Definition:For given KR system such that K = (U,A), we can define decision table as follows
T = (U,A,C,D)where U = universe
A = set of actionsC = condition attributes D = decision attributes
C,D is subset of AThis decision table is also called ‘ CD – decision table’.
Core and Reduct
Core is a condition attribute value which is indispensable that means it discern the value of decision attribute.
Reduct is a decision rule which must satisfy following conditions
1. The rule must be true or consistent.2. Predecessor of rule must be independent.
Simplification of decision table It means removal of unnecessary conditions to make the decision.We will show it with the following steps listed.
1. Check dependency of condition attribute decision attribute
2. Reduction of condition attribute, if any.3. Find core values of all decision rules.4. Find reducts of each decision rule.5. Combine and assign unique rule number to each rule.
Let take the example of optician’s decision of whether the patient is suitable for contact lens or not.We have set of condition a, b, c and d. which is shown below
a. Age 1. young2. pre-presbyopic3. prebyopic
b. Spectacle1. myope condition 2. hypermetrope attributes
c. astigmatic1. no2. yes
d. tear production rate1. reduced2. normal
Based on given condition the optician has to take one out three of the following decision.
1. hard contact lens2. soft contact lens decision attributes3. no contact lens
So we have total of 24 (3*2*2*2) possible combination of given conditions which are shown with their decision in tabular form below.
U A B C D E---- ---- ---- ---- ---- ----1 1 1 2 2 12 1 2 2 2 13 2 1 2 2 14 3 1 2 2 1
---- ---- ---- ---- ---- ----5 1 1 1 2 26 1 2 1 2 27 2 1 1 2 28 2 2 1 2 29 3 2 1 2 2
---- ---- ---- ---- ---- ----10 1 1 1 1 311 1 1 2 1 312 1 2 1 1 313 1 2 2 1 314 2 1 1 1 315 2 1 2 1 316 2 2 1 1 317 2 2 2 1 318 2 2 2 2 319 3 1 1 1 320 3 1 1 2 321 3 1 2 1 322 3 2 1 1 323 3 2 2 1 324 3 2 2 2 3
1. Check dependency of condition attribute decision attribute2. Reduction of condition attribute, if any.3. Find core values of all decision rules.4. Find reducts of each decision rule.5. Combine and assign unique rule number to each rule.
Check dependency of condition attribute decision attribute
every set of condition attribute must have unique decision attribute.
If the above shown condition is true for all decision rule then we say that dependency condition attribute decision attribute is valid.
Logically it is represented as below{a,b,c,d} == > {e}
1. Check dependency of condition attribute decision attribute2. Reduction of condition attribute, if any.3. Find core values of all decision rules.4. Find reducts of each decision rule.5. Combine and assign unique rule number to each rule.
Reduction of condition attribute, if any.Now check for each condition attribute whether it is dispensable or indispensable with respect to decision attribute.Suppose we are checking for condition attribute a in a given example.
Remove a and look for the rest of the condition attribute.(shown in figure)
After removal of a we have two pairs of decision rule which are inconsistent.1. b2c2d2 e1 (rule 2) b2c2d2 e3 (rule 18 and 24)
2. b1c1d2 e2 (rule 5) b1c1d2 e3 (rule 20)So condition attribute a is indispensable that means not removable.Checking every condition attribute we found that every attribute is indispensable so no one is removable.So now we can say that given table is e-independent.
After removal of condition attribute aU B C D E
---- ---- ---- ---- ----1 1 2 2 12 2 2 2 13 1 2 2 14 1 2 2 1
---- ---- ---- ---- ----5 1 1 2 26 2 1 2 27 1 1 2 28 2 1 2 29 2 1 2 2
---- ---- ---- ---- ----10 1 1 1 311 1 2 1 312 2 1 1 313 2 2 1 314 1 1 1 315 1 2 1 316 2 1 1 317 2 2 1 318 2 2 2 319 1 1 1 320 1 1 2 321 1 2 1 322 2 1 1 323 2 2 1 324 2 2 2 3
1. Check dependency of condition attribute decision attribute2. Reduction of condition attribute, if any.3. Find core values of all decision rules.4. Find reducts of each decision rule.5. Combine and assign unique rule number to each rule.
Find core values of all decision rules.
We have to find out the core values of each decision rule in order to decide the reducts of that rule, because
core is an intersection of all reduct of same rule.Consider the condition attribute and rules associated with decision attribute 1 that is e1.
If we want to find out the core of first rule that is a1b1c2d2 e1First remove A and check for rest of attribute, you find that
b1c2d2 e1 (rule 1) and b1c2d2 e1 (rule 3)which are inconsistent rule under decision attribute e1.
So attribute A of rule 1 is not core. Similarly B is also not core but C and D are core attribute for rule 1.
U A B C D E1 1 1 2 2 12 1 2 2 2 13 2 1 2 2 14 3 1 2 2 1
U A B C D E---- ---- ---- ---- ---- ----1 - - 2 2 12 1 2 2 13 - 1 2 2 14 - 1 2 2 1
---- ---- ---- ---- ---- ----5 - - 1 2 26 - - 1 2 27 2 - 1 2 28 - - 1 2 29 - 2 1 2 2
---- ---- ---- ---- ---- ----10 - - - 1 311 - - - 1 312 - - - 1 313 - - - 1 314 - - - 1 315 - - - 1 316 - - - 1 317 - - - - 318 2 2 2 - 319 - - - - 320 3 1 1 - 321 - - - 1 322 - - - 1 323 - - - - 324 3 2 2 - 3
Core values of decision table
1. Check dependency of condition attribute decision attribute2. Reduction of condition attribute, if any.3. Find core values of all decision rules.4. Find reducts of each decision rule.5. Combine and assign unique rule number to each rule.
Find reducts of each decision rule.
We have to add to the core value of each decision rule, such value of condition attribute of that rule so the
1. Predecessor of rule is independent.2. The rule is true.
Suppose we are checking for first rule that is a1b1c2d2 e1We already know that first rule has two core that is C and D. i.e.
U A B C D E1 _ _ 2 2 1
So here we have three possibility of reduct which are1 X 1 2 2 1 i.e. Rule b1c2d2 e1 possibility for1 1 X 2 2 1 i.e. Rule a1c2d2 e1 reducts of1 X X 2 2 1 i.e. Rule c2d2 e1 first rule
Now check for every rule whether it is true or not.
U A B C D E---- ---- ---- ---- ---- ----1 x 1 2 2 11’ 1 x 2 2 1
---- ---- ---- ---- ---- ----2 1 x 2 2 13 x 1 2 2 14 x 1 2 2 1
---- ---- ---- ---- ---- ----5 1 x 1 2 2
---- ---- ---- ---- ---- ----6 1 x 1 2 26’ x 2 1 2 2
---- ---- ---- ---- ---- ----7 2 x 1 2 28 2 x 1 2 2
8’ x 2 1 2 2---- ---- ---- ---- ---- ----9 x 2 1 2 2
---- ---- ---- ---- ---- ----10 x x x 1 311 x x x 1 312 x x x 1 313 x x x 1 314 x x x 1 315 x x x 1 316 x x x 1 3---- ---- ---- ---- ---- ----17 x x x 1 317’ 2 2 2 x 3---- ---- ---- ---- ---- ----18 2 2 2 x 3---- ---- ---- ---- ---- ----19 3 1 1 x 319’ x x x 1 3---- ---- ---- ---- ---- ----20 3 1 1 x 321 x x x 1 322 x x x 1 323 x x x 1 3---- ---- ---- ---- ---- ----24 3 2 2 x 3
1. Check dependency of condition attribute decision attribute2. Reduction of condition attribute, if any.3. Find core values of all decision rules.4. Find reducts of each decision rule.5. Combine and assign unique rule number to each rule.
Combine and assign unique rule number to each rule.
In the last step we have to categorize the reducts which have the same decision rule.
And then assign a unique number to each of these decision rule, and it is your minimal decision table.
So after categorize the rules it will look like this
U A B C D E
---- ---- ---- ---- ---- ----
1’,2 1 x 2 2 1
1,3,4 x 1 2 2 1
---- ---- ---- ---- ---- ----
5,6 1 x 1 2 2
7,8 2 x 1 2 2
6’,8’,9 x 2 1 2 2
---- ---- ---- ---- ---- ----
10-17,19’21,22,23 x x x 1 3
17’,18 2 2 2 x 3
19,20 3 1 1 x 3
23’,24 3 2 2 x 3
And finally our minimal decision table will be as follows
U A B C D E---- ---- ---- ---- ---- ----
1 1 x 2 2 12 x 1 2 2 1
---- ---- ---- ---- ---- ----3 1 x 1 2 24 2 x 1 2 25 x 2 1 2 2
---- ---- ---- ---- ---- ----6 x x x 1 37 2 2 2 x 38 3 1 1 x 39 3 2 2 x 3
Decision algorithmFor making decision algorithm from decision table follow two steps.
1. replace all the value into the minimal decision table.2. combine all the rules as per particular decision attribute.
From given minimal decision table we have the following rules.
a1c2d2 e1b1c2d2 e1a1c1d2 e2a2c1d2 e2b2c1d2 e2 d1 e3a2b2c2 e3a3b1c1 e3a3b2c2 e3
Now combine the rules as per decision attribute, we will have decision algorithm
By combining rules we have
(a1 V b1)c2d2 e1 (a1 V a2 V b2)c1d2 e2
d1 V (a3b2c1) V ((a2 V a3)b2c2) e3.
Which is our decision algorithm.
Degree of dependencyDegree of dependency can be calculated with the formulae
number of unaffected rule with lack of this attribute degree of dependency = ----------------------------------------------------------------------
total number of rules
degree of dependency of a = 19 / 24 i.e. 5 rule affected (2,5,18,20,24)degree of dependency of b = 3/4 i.e. 6 rule affecteddegree of dependency of c = 1/2 i.e. 13 rule affecteddegree of dependency of d = 1/4 i.e. 18 rule affected
So attribute d is the most significant one in our decision table, because with the lack of attribute d, 18 rules are affected.
Q & A