View
3
Download
0
Category
Preview:
Citation preview
Fuzzy Sets and Fuzzy Logic
Application
Application(From a press release)
Equens to offer RiskShield Fraud Protection for Card Payments
Today Equens, one of the largest pan-European card and payment Processors, announced that it has selected RiskShield from INFORM GmbH as the basis for a new approach to fraud detection and behaviour monitoring. By utilising the flexibility offered by RiskShield, Equens will be able to offer tailor-made fraud management services to issuers and acquirers.
UTRECHT, The Netherlands, 30/10/2012
ApplicationFrom the
brochureof “RiskShield”
Application
Fuzzy sets on discrete universesFuzzy set C = “desirable city to live in”
X = {SF, Boston, LA} (discrete and non-ordered)C = {(SF, 0.9), (Boston, 0.8), (LA, 0.6)}
Fuzzy set A = “sensible number of children”X = {0, 1, 2, 3, 4, 5, 6} (discrete universe)A = {(0, .1), (1, .3), (2, .7), (3, 1), (4, .6), (5, .2), (6, .1)}
N u m b e r o f C h i l d r e n
Mem
bers
hip
Gra
des
Fuzzy sets & fuzzy logicFuzzy sets can be used to define a level of truth of
factsFuzzy set C = “desirable city to live in”
X = {SF, Boston, LA} (discrete and non-ordered)C = {(SF, 0.9), (Boston, 0.8), (LA, 0.6)}
corresponds to a fuzzy interpretation in which C(SF) is true with degree 0.9C(Boston) is true with degree 0.8C(LA) is true with degree 0.6
membership function can be seen as a →(fuzzy) predicate.
Fuzzy logic formulasMembership functions:
B=”City is beautiful”C=”City is clean”
Formulas:
What is the truth value of such formulas for given x?
We need to define a meaning for the connectives
Fuzzy logic formulasStandard interpretations of connectives in fuzzy logic:
Negation:
Conjunction:
Disjunction:
• General requirements:
– Boundary: N(0)=1 and N(1) = 0
– Monotonicity: N(a) > N(b) if a < b
– Involution: N(N(a)) = a• Two types of fuzzy complements:
– Sugeno’s complement:
– Yager’s complement:
N aa
sas( ) = −+
1
1
N a aww w( ) ( ) /= −1 1
N aa
sas( ) = −+
1
1N a aw
w w( ) ( ) /= −1 1
Sugeno’s complement: Yager’s complement:
0 0.5 10
0.2
0.4
0.6
0.8
1(a) Sugeno's Complements
a
N(a
)
s = 20
s = 2
s = 0
s = -0.7
s = -0.95
0 0.5 10
0.2
0.4
0.6
0.8
1(b) Yager's Complements
a
N(a
)w = 0.4
w = 0.7
w = 1
w = 1.5
w = 3
• Basic requirements:
– Boundary: T(0, a) = T(a,0) = 0, T(a, 1) = T(1, a) = a
– Monotonicity: T(a, b) <= T(c, d) if a <= c and b <= d
– Commutativity: T(a, b) = T(b, a)
– Associativity: T(a, T(b, c)) = T(T(a, b), c)
Generalized intersection (Triangular/T-norm, logical and)
• Examples:
– Minimum:
– Algebraic product:
– Bounded product:
– Drastic product:
T ( a , b)=min(a , b)
T (a , b )=a⋅b
T (a , b )=max (0,( a+ b−1 ))
Generalized intersection(Triangular/T-norm)
T (a , b )={a if b=1b if a=10 otherwise ]
0 0.5 10
0.5
10
0.5
1
X = a
(c) Bounded Product
Y = b
0 10 200
10
200
0.5
1
X = xY = y
0 0.5 10
0.5
10
0.5
1
X = a
(d) Drastic Product
Y = b
0 10 200
10
200
0.5
1
X = xY = y
Minimum:Tm(a, b)
Algebraicproduct:Ta(a, b)
Boundedproduct:Tb(a, b)
Drasticproduct:Td(a, b)
≥ ≥≥
0 0.5 10
0.5
10
0.5
1
a
(a) Min
b
0 10 200
10
200
0.5
1
X = xY = y
0 0.5 10
0.5
10
0.5
1
X = a
(b) Algebraic Product
Y = b
0 10 200
10
200
0.5
1
X = xY = y
• Basic requirements:
– Boundary: S(1, a) = 1, S(a, 0) = S(0, a) = a– Monotonicity: S(a, b) < S(c, d) if a < c and b < d
– Commutativity: S(a, b) = S(b, a)– Associativity: S(a, S(b, c)) = S(S(a, b), c)
• Examples:
– Maximum:
– Algebraic sum:
– Bounded sum:
– Drastic sum
S ( a ,b )=max(a ,b)
bababaS ⋅−+=),(
S ( a ,b )=min(1,( a+b ))
Maximum:Sm(a, b)
Algebraicsum:
Sa(a, b)
Boundedsum:
Sb(a, b)
Drasticsum:
Sd(a, b)≤ ≤≤
0 0.5 10
0.5
10
0.5
1
X = a
(c) Bounded Sum
Y = b
0 10 200
10
200
0.5
1
X = xY = y
0 0.5 10
0.5
10
0.5
1
X = a
(d) Drastic Sum
Y = b
0 10 200
10
200
0.5
1
X = xY = y
0 0.5 10
0.5
10
0.5
1
X = a
(a) Max
Y = b
0 10 200
10
200
0.5
1
X = xY = y
0 0.5 10
0.5
10
0.5
1
X = a
(b) Algebraic Sum
Y = b
0 10 200
10
200
0.5
1
X = xY = y
Generalized De Morgan’s LawT-norms and T-conorms are duals which support the
generalization of DeMorgan’s law:T(a, b) = N(S(N(a), N(b)))S(a, b) = N(T(N(a), N(b)))
Tm(a, b)Ta(a, b)Tb(a, b)Td(a, b)
Sm(a, b)Sa(a, b)Sb(a, b)Sd(a, b)
Fuzzy if-then rulesGeneral format:
If x is A then y is BExamples:
If pressure is high, then volume is smallIf a restaurant is expensive, then order small dishesIf a tomato is red, then it is ripeIf the speed is high, then apply the brake a little
A coupled with B
AA
B B
A entails By
xx
y
Implication in traditional logicCommon in Fuzzy logic
Interpretation of Implication
Use the T-norm...
0 0.5 10
0.5
10
0.5
1
a
(a) Min
b
0 10 200
10
200
0.5
1
xy
0 0.5 10
0.5
10
0.5
1
a
(b) Algebraic Product
b
0 10 200
10
200
0.5
1
xy
0 0.5 10
0.5
10
0.5
1
a
(c) Bounded Product
b
0 10 200
10
200
0.5
1
xy
0 0.5 10
0.5
10
0.5
1
a
(d) Drastic Product
b
0 10 200
10
200
0.5
1
xy
A entails BBoolean fuzzy implication (based on )
Zadeh's max-min implication (based on )
Zadeh's arithmetic implication (based on )
Goguen's implication
mR( x , y )=max (1−mA( x ) ,mB( y ))
¬A∨B
¬A∨( A∧B)
mR( x , y )=max (1−mA( x ) ,min (mA( x ) ,mB( y )))
¬A∨BmR( x , y )=min (1−mA( x )+ mB( y ) ,1)
mR( x , y )=min (mB( x )/mA( y ) ,1)
0 0.5 10
0.5
10
0.5
1
a
(a) Zadeh's Arithmetic Rule
b
0 10 200
10
200
0.5
1
xy
0 0.5 10
0.5
10
0.5
1
a
(b) Zadeh's Max-Min Rule
b
0 10 200
10
200
0.5
1
xy
0 0.5 10
0.5
10
0.5
1
a
(c) Boolean Fuzzy Implication
b
0 10 200
10
200
0.5
1
xy
0 0.5 10
0.5
10
0.5
1
a
(d) Goguen's Fuzzy Implication
b
0 10 200
10
200
0.5
1
xy
Fuzzy inference systemsGiven a number of fuzzy rules:
if temperature is low, then set heating highif air is dry, then set heating low
If we do the observationtemperature is 15c,air humidity 30%
how do we set the heating?
Discussed here: Mamdani systems
Building blocksFuzzifier (in the simplest case, turn a measurement into a
crisp set)Rule baseInference engineDefuzzifier
Fuzz
i fie
r
Def
uz z
ifie
rRule base(knowledge base)
Inference engine
input
outp
ut
Mamdani Systems:Illustration on case 1When given are
a fuzzy rule A B, where A and B are fuzzy sets defined →by membership functions and
a measurement a for AThe membership function for A B is defined by→
For a measurement a the membership for y is
Mamdani Systems:Illustration on case 2When rules contain multiple conditions, the min is
taken over these conditions
Mamdani Systems:Illustration on case 3
• Rule: if x is A then y is B• Observation: x is A’ (fuzzy set)• Conclusion: y is B’ (fuzzy set)
defined as follows:
Graphic Representation)(
)())]()(([)( ''
yw
yxxy
B
BAAxB
µµµµµ
∧=∧∧∨=
A
X
w
A’ B
Y
x is A’
B’
Y
A’
Xy is B’
Fuzzy observations
• Rule: if x is A and y is B then z is C• Fact: x is A’ and y is B’• Conclusion: z is C’Graphic Representation
A B T-norm
X Y
w
A’ B’ C2
Z
C’
ZX Y
A’ B’
x is A’ y is B’ z is C’
A1 B1
A2 B2
T-norm
X
X
Y
Y
w1
w2
A’
A’ B’
B’ C1
C2
Z
Z
C’Z
X Y
A’ B’
x is A’ y is B’ z is C’
Defuzzification rulesCentroid-of-area
Bisector of area
Mean of maximum
Smallest of maximum
Largest of maximum
∫∫=
Z A
Z A
dzz
dzzzz
)(
)(*
µ
µ
∫ ∫∞−∞
=*
*)()(
z
z AA dzzdzz µµ
*})(|{',*
'
' µµ ===∫∫
zzZdz
dzzz A
Z
Z
zZz '
min∈
zZz '
max∈
range of valueswheremembershipis maximal
Mamdani - single input
-10 -8 -6 -4 -2 0 2 4 6 8 100
0.2
0.4
0.6
0.8
1
1.2
X
Me
mb
ersh
ip G
rad
es small medium large
0 1 2 3 4 5 6 7 8 9 100
0.2
0.4
0.6
0.8
1
1.2
Y
Me
mb
ersh
ip G
rad
es small medium large
X is Small →Y is Small
X is Medium →Y is Medium
X is Large →Y is Large
Mamdani - single input
-10 -8 -6 -4 -2 0 2 4 6 8 100
1
2
3
4
5
6
7
8
9
10
X
Y
-10 -8 -6 -4 -2 0 2 4 6 8 100
0.2
0.4
0.6
0.8
1
1.2
X
Mem
bers
hip G
r ades
small medium large
0 1 2 3 4 5 6 7 8 9 100
0.2
0.4
0.6
0.8
1
1.2
Y
Mem
bers
hip G
r ades
small medium large
Mamdani - double input
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.5
1
X
Mem
bers
hip
Gra
des
small large
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.5
1
Y
Mem
bers
hip
Gra
des
small large
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.5
1
Z
Mem
bers
hip
Gra
des
large negative small negative small positive large positive
X is Small and Y is Small Z is →negative Large
X is Small and Y is Large Z is →negative Small
X is Large and Y is Small Z is →positive Small
if X is Large and Y is Large Z →is positive Large
Mamdani - double input
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.5
1
X
Mem
bers
hip
Gra
des
small large
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.5
1
Y
Mem
bers
hip
Gra
des
small large
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.5
1
Z
Mem
bers
hip
Gra
des
large negative small negative small positive large positive
-5
0
5
-5
0
5
-3
-2
-1
0
1
2
3
XY
Z
Recommended