31
Decision tables

Chapter 6

Embed Size (px)

Citation preview

Page 1: Chapter 6

Decision tables

Page 2: Chapter 6

Contents

IntroductionFormal Definition and Some PropertiesSimplification of decision tables

Page 3: Chapter 6

1.Introduction

• Decision tables: is a kind of prescription, which specifies what decisions should be undertaken when some conditions are satisfied.

• Most decision problems can be formulated employing decision table formalism; therefore, this tool is particularly useful in decision making.

Page 4: Chapter 6

2.Formal Definition and Some Properties

Decision tables can be defined in terms of KRS. Let K=(U,A) be a KRS and let be two subsets

of attributes, called condition and decision attributes. KRS with distinguished condition and decision attributes

will be called a decision table and will be denoted

Equivalence classes of the relation IND(C) will be called condition classes.

Equivalence classes of the relation IND(D) will be called decision classes.

ADC ⊂,

),,,( DCAUT =

Page 5: Chapter 6

• For every

dx called a decision rule and x will be referred to as a label of the decision rule dx

dx|C is the restriction of dx to C and called conditions of dx.

dx|D is the restriction of dx to D and called conditions of dx.

The decision rule dx is consistentconsistent (in T) if for every , dx|C = dy|C implies dx|D = dy|D; otherwise the decision rule is inconsistent.

V A : →∈

xdUx

D C aevery for a(x), (a)dx ∪∈=A decision table is consistent if all its decision its

decision rules are consistent; otherwise the decision table is inconsistent

xy ≠

Page 6: Chapter 6

Proposition

A decision table T = (U,A,C,D) is consistentconsistent, iff C D

The practical method of checking consistency of a decision table is by simply computing the degree of dependency between condition and decision attributes.

If the degree of dependency equals 1, then the table is consistent.

Page 7: Chapter 6

Proposition

Each decision table can be uniquely decomposed into two decision tables and such that in and in , where and

– Compute the dependency between condition and decision attributes

– If dependency degree was less than 1 (the table is inconsistent), then decompose the table into two subtables

),,,( DCAUT =),,,( 11 DCAUT =

),,,( 22 DCAUT = DC 1⇒ 1T DC 0⇒

2T )(1 DPOSU C= )(/

2 )(DINDUX

C XBNU∈

=

Page 8: Chapter 6

Example

101108

211127

110226

102015

220114

110023

211102

022011

edcbaU

condition attribute

decision attribute

211127

110226

220114

110023

edcbaU

101108

102015

211102

022011

edcbaU

consistent

totally inconsistent

Inconsistent table

Page 9: Chapter 6

3.Simplification of decision tables

reduction of condition attributesSteps:

1) Computation of reducts of condition attributes which is equivalent to elimination of some column from the decision tables

2) Elimination of duplicate rows

3) Elimination of superfluous values of attributes

Page 10: Chapter 6

Example

222227

220126

220115

010114

000003

100012

110011

edcbaU Condition Attributes:   a: Va = {0, 1, 2}   b: Vb = {0, 1, 2}

c: Vc = {0, 2} d: Vd = {0, 1, 2}

Decision Attribute: e: Ve = {0, 1, 2}

Page 11: Chapter 6

22227

22016

22015

01014

00003

10002

11001

edcbU

Removing attribute a

Removing attribute a causes inconsistency.

00003

10002

:

:

edcbu

edcbu

→→

Page 12: Chapter 6

22227

22026

22015

01014

00003

10012

11011

edcaU

Removing attribute b causes inconsistency.

01014

11011 : :

edcauedcau

→→

Removing attribute b

Page 13: Chapter 6

22227

22126

22115

01114

00003

10012

11011

edbaU Removing attribute c doesn’t cause inconsistency.We can eliminate c

Removing attribute c

Page 14: Chapter 6

Removing attribute d

Removing attribute d causes inconsistency.

20115

00114

:

:

ecbau

ecbau

→→

22227

20126

20115

00114

00003

10012

10011

ecbaU

Page 15: Chapter 6

Conclusion!

• e-dispensable condition attribute is c.

• let R={a, b, c, d}, D={e}CORED(R) ={a, b, d}

REDD(R) ={a, b, d}

22227

22126

22115

01114

00003

10012

11011

edbaU

Page 16: Chapter 6

• we have to reduce superfluous values of condition attributes in every decision rules

→ compute the core values– In the 1st decision rules

the core of the family of sets

}1{}4,1{}3,2,1{}5,4,2,1{ =∩∩=

}}4,1{},3,2,1{},5,4,2,1{{}]1[,]1[,]1{[ == dbaF

dbadba ]1[]1[]1[]1[ },,{ ∩∩=

}2,1{]1[,1)1(,0)1(,1)1( ==== edba

}1{}4,1{}3,2,1{]1[]1[ =∩=∩ db

}4,1{}4,1{}5,4,2,1{]1[]1[ =∩=∩ da

}2,1{}3,2,1{}5,4,2,1{]1[]1[ =∩=∩ ba

0)1( =b the core value is

22227

22126

22115

01114

00003

10012

11011

edbaU

Page 17: Chapter 6

1. In the 2nd decision rules– the core of the family of sets

– the core value is

}}3,2{},3,2,1{},5,4,2,1{{}]2[,]2[,]2{[ == dbaF}2{]2[]2[]2[]2[ },,{ =∩∩= dbadba

}2,1{]2[,0)2(,0)2(,1)2( ==== edba

}2,1{]2[]2[},2{

]2[]2[},3,2{]2[]2[

=∩=∩=∩

ba

dadb

1)2( =a22227

22126

22115

01114

00003

10012

11011

edbaU

Page 18: Chapter 6

22227

22126

22115

01114

00003

10012

11011

edbaU1. In the 2nd decision rules

the core of the family of sets

the core value is

}}3,2{},3,2,1{},3{{}]3[,]3[,]3{[ == dbaF

}3{]3[]3[]3[]3[ },,{ =∩∩= dbadba

}4,3{]3[,0)3(,0)3(,0)3( ==== edba

}3{]3[]3[},3{

]3[]3[},3,2{]3[]3[

=∩=∩=∩

ba

dadb

0)3( =a

Page 19: Chapter 6

22227

22126

22115

01114

00003

10012

11011

edbaU

– In the 4th decision rules the core of the family of sets

the core value is

}}4,1{},6,5,4{},5,4,2,1{{}]4[,]4[,]4{[ == dbaF

}4{]4[]4[]4[]4[ },,{ =∩∩= dbadba

}4,3{]4[,1)4(,1)4(,1)4( ==== edba

}5,4{

]4[]4[},4,1{]4[]4[},4{]4[]4[

=∩=∩=∩ badadb

1)4(,1)4( == db

Page 20: Chapter 6

– In the 5th decision rules the core of the family of sets

the core value is 22227

22126

22115

01114

00003

10012

11011

edbaU}}7,6,5{},6,5,4{},5,4,2,1{{}]5[,]5[,]5{[ == dbaF

}5{]5[]5[]5[]5[ },,{ =∩∩= dbadba

}7,6,5{]5[,2)5(,1)5(,1)5( ==== edba

}5,4{

]5[]5[},5{]5[]5[},6,5{]5[]5[

=∩=∩=∩ badadb

2)5( =d

Page 21: Chapter 6

– In the 6th decision rules the core of the family of sets

the core value is : not exist22227

22126

22115

01114

00003

10012

11011

edbaU}}7,6,5{},6,5,4{},7,6{{}]6[,]6[,]6{[ == dbaF

}6{]6[]6[]6[]6[ },,{ =∩∩= dbadba

}7,6,5{]6[,2)6(,1)6(,2)6( ==== edba

}6{

]6[]6[},7,6{]6[]6[},6,5{]6[]6[

=∩=∩=∩ badadb

Page 22: Chapter 6

– In the 7th decision rules the core of the family of sets

the core value is : not exist22227

22126

22115

01114

00003

10012

11011

edbaU}}7,6,5{},7{},7,6{{}]7[,]7[,]7{[ == dbaF

}7{]7[]7[]7[]7[ },,{ =∩∩= dbadba

}7,6,5{]7[,2)7(,2)7(,2)7( ==== edba

}7{

]7[]7[},7,6{]7[]7[},7{]7[]7[

=∩=∩=∩ badadb

Page 23: Chapter 6

2---7

2---6

22--5

011-4

0--03

1--12

1-0-1

edbaU The final result after computing the core value for each condition attribute in every decision rule.

Page 24: Chapter 6

• to compute value reducts– let’s compute value reducts for the ~– 1st decision rules of the decision table

– 2 value reducts

1.

2. – Intersection of reducts : → core value

1)1(and0)1( == db

0)1(and1)1( == ba

0)1( =b

}2,1{]1[}1{}4,1{}3,2,1{]1[]1[ =⊆=∩=∩ edb

eda ]1[}4,1{}4,1{}5,4,2,1{]1[]1[ ⊄=∩=∩

edebea ]1[}4,1{]1[,]1[}3,2,1{]1[,]1[}5,4,2,1{]1[ ⊄=⊄=⊄=

eba ]1[}2,1{}3,2,1{}5,4,2,1{]1[]1[ ⊆=∩=∩

Page 25: Chapter 6

– 2nd decision rules of the decision table

– 2 value reducts :

– Intersection of reducts : → core value

– 3rd decision rules of the decision table

– 1 value reduct :

– Intersection of reducts : → core value

}2,1{]2[}3,2{]2[]2[ =⊄=∩ edb

ebaeda ]2[}2,1{]2[]2[,]2[}2{]2[]2[ ⊆=∩⊆=∩

edebea ]2[}3,2{]2[,]2[}3,2,1{]2[,]2[}5,4,2,1{]2[ ⊄=⊄=⊄=

}4,3{]3[}3,2{]3[]3[ =⊄=∩ edb

ebaeda ]3[}3{]3[]3[,]3[}3{]3[]3[ ⊆=∩⊆=∩

edebea ]3[}3,2{]3[,]3[}3,2,1{]3[,]3[}3{]3[ ⊄=⊄=⊆=

0)3( =a0)3( =a

0)2(and1)2(or0)2(and1)2( ==== bada0)2( =a

Page 26: Chapter 6

– 4th decision rules of the decision table

– 1 value reduct :

– Intersection of reducts : → core value

– 5th decision rules of the decision table

– 1 value reduct :

– Intersection of reducts : → core value

0)4(and1)4( == db

2)5( =d

0)4(and1)4( == db

2)5( =d

}4,3{]4[}4{]4[]4[ =⊆=∩ edb

ebaeda ]4[}5,4{]4[]4[,]4[}4,1{]4[]4[ ⊄=∩⊄=∩

edebea ]4[}4,1{]4[,]4[}3,2,1{]4[,]4[}5,4,2,1{]4[ ⊄=⊄=⊄=

edebea ]5[}7,6,5{]5[,]5[}6,5,4{]5[},7,6,5{]5[}5,4,2,1{]5[ ⊆=⊄==⊄=

}7,6,5{]5[}5{]5[]5[},7,6,5{]5[}6,5{]5[]5[ 22 =⊆=∩=⊆=∩ dadb

}7,6,5{]5[}5,4{]5[]5[ 2 =⊄=∩ ba

Page 27: Chapter 6

– 6th decision rules of the decision table

– 2 value reducts :

– Intersection of reducts : → core value : not exist2)6(or2)6( == da

φ

edebea ]6[}7,6,5{]6[,]6[}6,5,4{]6[},7,6,5{]6[}7,6{]6[ ⊆=⊄==⊆=

}7,6,5{]6[}7,6{]6[]6[},7,6,5{]6[}6,5{]6[]6[ =⊆=∩=⊆=∩ edaedb

}7,6,5{]6[}6{]6[]6[ =⊆=∩ eba

Page 28: Chapter 6

– 7th decision rules of the decision table

– 3 value reducts

– Intersection of reducts : → core value : not exist

2)7(or2)7(or2)7( === dba

φ

},7,6,5{]7[}7,6{]7[ =⊆= ea

edeb ]7[}7,6,5{]7[,]7[}7{]7[ ⊆=⊆=

}7,6,5{]7[}7,6{]7[]7[},7,6,5{]7[}7{]7[]7[ =⊆=∩=⊆=∩ edaedb

}7,6,5{]7[}7{]7[]7[ =⊆=∩ eba

Page 29: Chapter 6

22ⅩⅩ7

2Ⅹ2Ⅹ7 ′

22ⅩⅩ6

110Ⅹ1′

1Ⅹ011

2ⅩⅩ27″

2ⅩⅩ26 ′

22ⅩⅩ5

011Ⅹ4

0ⅩⅩ03

10Ⅹ12 ′

1Ⅹ012

edbaU

reducts :

= 24 solutions to our problem

3211122 ××××××

Page 30: Chapter 6

22ⅩⅩ7

22ⅩⅩ6

1Ⅹ011

22ⅩⅩ5

011Ⅹ4

0ⅩⅩ03

1Ⅹ012

edbaU

22ⅩⅩ6

1Ⅹ011

2ⅩⅩ27

22ⅩⅩ5

011Ⅹ4

0ⅩⅩ03

10Ⅹ12

edbaU

The Solution Another Solution

Page 31: Chapter 6

1Ⅹ011,2

22ⅩⅩ5,6,7

011Ⅹ4

0ⅩⅩ03

edbaU

1Ⅹ011

22ⅩⅩ4

011Ⅹ3

0ⅩⅩ02

edbaU

identical

enumeration is not essential

22ⅩⅩ7

22ⅩⅩ6

1Ⅹ011

22ⅩⅩ5

011Ⅹ4

0ⅩⅩ03

1Ⅹ012

edbaU

minimal

solution