many-valued similarity - theory and applications of fuzzy reasoning esko turunen tampere university...

19
Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Post on 19-Dec-2015

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Many-valued Similarity- Theory and Applications of

Fuzzy Reasoning

Esko Turunen

Tampere University of Technology Finland

Page 2: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

All human beings are mortalSokrates is a human being

Motivation

Sokrates is mortal)(

))()((

sH

xMxHx

)(sM

Aristotelian logic:

It took thousands of years before Aristotelian informal logic was expressed in a formal way, today known as First-order Boolean Logic

In 1960’s Zadeh introdused Fuzzy Logic:

Red apples are ripeThis apple is more or less red

This apple is almost ripe

More generally (fuzzy rule systems):IF x is in A1 and y is in B1 THEN z is in C1

*

*

*

IF x is in An and y is in Bn THEN z is in CnWhat is the mathematical formalism of Zadeh’s Fuzzy Logic?We claim it is Pavelka - Lukasiewicz many-valued logic, in particular, many-valued similarity.

Lecture I

Page 3: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

In science, we always want to minimize the set of axioms and maximize the set of theconsequences of these axioms. Thus, consider the following

Definition 1. Let L be a non-void set, 1 an element of L and →, * a binary and unaryoperation, respectively, defined on L such that, for all x, y, z in L, we have:

,1 )1( xx ,1)]()[()( )2( zxzyyx

,)()( )3( xxyyyx .1)()( )4( ** xyyx

Then the system L = L, →,*,1 is called Wajsberg algebra.

Now, define on a Wajsberg algebra L a binary relation ≤ by (5) x ≤ y iff x→y = 1. Then, by (2) we have

.1)]1()1[()11( xxHence, by (1) we have ,1)(1 xx which implies (6) x→x = 1, i.e. x ≤ x.

Let x→y = 1 and y→z = 1, that is, let x ≤ y and y ≤ z. By (2), ,1)](1[1 zx thus .1 zx (7) if x ≤ y, y ≤ z

then x ≤ z.Let x→y = 1 and y→x = 1, that is, let x ≤ y and y ≤ x.By (3), 1→y = 1→x, thus, x = y. We conclude (8) if x ≤ y, y ≤ x

then x = y.Equations (6) – (8) show that (5) defines an order on L.

Next we show that the element 1 is the greatest element with respect to this order, in other words

(9) for all x in L, x →1 = 1, i.e. x ≤ 1.

Page 4: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

To this end, we first reason, by (3), (1) and (6), (x→1)→1 = (1→x)→x = x→x = 1, that is (10) (x→1)→1 = 1On the other hand, by (1), (10), (1) and (2),

,1)]11()1[()1(]1)1[(1)1(1 xxxxxx in other words,

.1)1(1 x Thus, ,1)1(11)1( xx so by (8) .1 thus,,11 xx

First exercise. Show that the arrow operation is antitone in the first variable, that is,if x ≤ y then y→z ≤ x →z. [Hint: use equation (2)]

Proposition 1. In a Wajsberg algebra L, for any x, y, z in L,

,1)( )11( xyx ,1)]()[()( )12( yzxzyx).()( )13( zxyzyx

Proof. Since y ≤ 1 and → is antitone in the first variable we reason that 1→x ≤ y→x,therefore x ≤ y→x, thus (11) holds. To establish (12) we first verify

.1)( then ,1)( if )14( zxyzyx

Indeed, if x ≤ y→z then, as the arrow operation is antitone in the first variable, we have

.)( zxzzy By (3), ,)( zxyyz and, by (11),

,)( yyzy so that altogether we have .zxy By definition (5),

.1)( yealds this zxy Thus, (14) holds.

Page 5: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Applying (14) to (z→x)→[(x→y)→(z→y)] = 1, which holds by (2), we conclude(x→y)→[(z→x)→(z→y)] = 1, i.e. (12) holds. Finally, by (11) and (3),

,)()( zzyyyzy and by (12), ).()]([()( zxzyxzzy Therefore )()]([( zxzyxy

which, by (14), implies x→(y→z) ≤ y→(x→z).

By a similar argument y→(x→z) ≤ x→(y→z). We conclude that (13) holds.

Second exercise. Show that the arrow operation is isotone in the second variable, that is, if x ≤ y then z→x ≤ x→y. [Hint: use equation (12)]

Proposition 2. In a Wajsberg algebra L, for any x in L, .1 )16( ,1 )15( *** xxx

Proof. By (11), x* ≤ (1*)*→x*, by (4), (1*)*→x* ≤ x→1*, hence .1 )17( ** xx

On the other hand, by (4) and (1), ,11** xxx and, as the arrow operation isantitone in the first variable, ,1)1(1 **** xx which, by (3), implies that

,)1(1 **** xxx and by (13), .)1(1 )18( **** xxx Next we reason,

by (4) and (1), ,11)( ***** xxx and, by (11), ,1)(1 **** x thus .1 ** xHence, 11 ** x and, by (18), i.e. ,)1(1 ** xx .)1( )19( ** xx The (in-)equalities (17) and (19) now imply equation (15).

Page 6: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

The (in-)equality (16) follows by (11), (4) and (1), indeed, .111 *** xxx Remark. Condition (16) implies that 1* is the least element in the corresponding Wajsberg algebra L and will therefore denoted by 0. We write x** instead of (x*)*.

Third exercise. Show that, for all elements x, y in a Wajsberg algebra L, hold . iff (22) , (21) , )20( ****** xyyxxyyxxx

[Hint: Apply (13) and (4) for (20), moreover (4), (20) and (4) for (21) and finally, (20), (4) and (20) for (22).]

Till now we have seen that Wajsberg algebra axioms generate an order relation on L.Our aim is to show that, after a suitable stipulation, L becomes a lattice, that is, all pairs x, y of elements of L have the greatest lower bound in L and the least upper bound in Lwith respect to the order relation given by (5). For l.u.b{x,y} we set

.)( )23( yyxyx First we realize, by (11), that

,)( yyxy and then, by (11) and (3), .)()( yyxxxyx Let now z be such an element of L that x, y ≤ z. Then x→z =1 thus, by (1), (x→z)→z = z.Since the arrow operation is antitone on the first variable, we first reason z→x ≤ y→x, and then (y→x) →x ≤ (z→x) →x = z. We conclude that (y→x) →x coincide withl.u.b{x,y}, i.e. that (23) is a correct definition.

Page 7: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

For g.l.b{x,y} we set .)( )24( *** yxyx First we realize that iff ,)( *** yxyx

,, **** yxyx which is the case. On the other hand, if z is such an element of L that

., yxz Then ,, *** zyx therefore ,*** zyx and so .)( *** yxz We conclude that (24) is a correct definition.

Fourth exercise. Show that, for all elements x, y in a Wajsberg algebra L, holdde Morgan laws .)( ,)( )25( ****** yxyxyxyx [Hint: Apply (24) and (20).]

Define on a Wajsberg algebra L a binary operation (product) for each x, y, z in L via

.)( )26( **yxyx Then we have

Proposition 3. In a Wajsberg algebra L, for any x,y,z in L,

,)27( xyyx

,)()( )28( zyxzyx

. then if )29( zyzxyx

Proof. By (26), (20), (21) and (26), respectively, we have

.)()()( ******** xyxyyxyxyx Thus, (27) holds.

, then , If ** zxzyyx therefore so ,)()( **** zyzx .zyzx We have established (29). For (28) we reason in the following way

commutativity

associativity

isotonity

Lecture II

Page 8: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

(27)][by )()( yzxzyx (26)][by )( **yzx

(26)][by ])([ ****yzx

(20)][by ])([ **yzx

(13)][by ])([ **yxz

(20)][by ])([ ****yxz

(26)][by )( **yxz

(26)][by )( yxz

(27)][by )( zyx

Fifth exercise. Show that, for all elements x, y, z in a Wajsberg algebra L, hold

,1 )30( xx zyxzyx iff )31(

Galois connection

Remark. Equations (27) – (31)mean that lattice L generatedby Wajsberg algebra axioms isa residuated lattice. Thus, allproperties valid in a residuatedlattice hold in Wajsberg algebras,too. For example, the meet and

join operations are associative, commutative and absorption holds. For all x, y, z in L, ,)()()( )32( zyzxzyx ,)()()( )33( zxyxzyx

By (24), (23), (21) and (26) we reason that

,)(])[(])[()( ********* yxyyxyyyxyxyx and, by commutativity of Λ, we have )( )34( yxxyxa

Page 9: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Proposition 4. In a Wajsberg algebra L, for any x, y in L, .1)()( )34( xyyxb

Proof (of prelinearity). By (32) and (6), ,)()(1)()()( xyxyxyxxxyx and, similarly, ,)()( yxyyx therefore

])[(])[()()( yyxxyxyxxy (21)][by ])([])([ **** yxyyxx

(23)](13),[by ])([ *** yxxy

(20)] (21),[by ])([ *** yyxx (20)] (25),[by )]([ yyxx

]absorption[by yx Thus,

).()()()]()[(1 yxxyyxyxxy Therefore (34b) holds.

Remark. Residuated lattices such that (34a) and (34b) hold are called BL-algebras (Basic Logic algebras by P. Hajek 1997), moreover, BL-algebras such that a double negation low x**= x holds are known as MV-algebras (Multi Valued algebras by C.C. Chang 1957). Hence, Wajsberg algebras are MV-algebras. Even more is true, these twostructures coincide: each MV-algebra generates a Wajsberg algebras and vice versa.

Sixth exercise. Show that, for all elements x, y, z in a Wajsberg algebra L, holds

.)()()( )35( zxyxzyx [Hint: (21), (25), (23), (3), (13), (21)]

Page 10: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

In an MV-algebra, there is a binary operation ),( additionsum In a Wajsberg algebra,

a sum operation is introduced by a formula . )36( * yxyx

Seventh exercise. Show that, for all elements x, y, z in a Wajsberg algebra L, hold

.)( (38) ,)( )37( ** yyxyxyyxyx

For the sake of completeness, we present the original MV-algebra axioms of C.C. Chang.It will be an extra exercise to show that they hold in Wajsberg-algebras!

)()()( ,)()()( (48)

,)()( ,)()( (47)

, , (46)

,01 , (45)

,)( ,)( (44)

,1 ,0 (43)

,00 ,11 (42)

,0 ,1 (41)

,)()( ,)()( (40)

, , )39(

***

******

**

zxyxzyxzxyxzyx

zyxzyxzyxzyx

xyyxxyyx

xx

yxyxyxyx

xxxx

xx

xxxx

zyxzyxzyxzyx

xyyxxyyx

Page 11: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

We needed only four equational axioms to establish a rich structure. However, to be ableto introduce fuzzy inference in an axiomatic way, we will still need two more axioms.Unfortunately, they are not equational. First consider a completeness axiom

,Lx,Lx,L}Γix{ iΓi

iΓi

i assume subset any For

where L is an MV-algebra, called complete MV-algebra. For such algebras we have e.g.

Proposition 5. In a complete MV-algebra L, for any x L, {yi | iG }Í L.

),( )49(

iΓi

iΓi

yxyx ),( )50(

i

Γii

Γiyxyx

).()( )51(

xyxy iΓi

iΓi

Proof. Since the operation is isotone, we have, for each i in Г, ,

iΓi

i yxyx

therefore .)(

iΓi

iΓi

yxyx Conversely, )( i

Γii yxyx

for each i,

by the Galois connection, equivalent to .each for ),( Γiyxxy iΓi

i

Therefore ).(

iΓi

iΓi

yxxy Again by the Galois connection we conclude

).(

iΓi

iΓi

yxyx We have demonstrated equation (49). Equation (50) can be

shown in a quite similar manner. Indeed, since for each i, ,

iiΓi

yxyx

we have ).(

iΓi

iΓi

yxyx Conversely, trivially .,)( Γiyxyx ii

Γi

Page 12: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Thus, by the Galois connection, .,)( Γiyxyx iiΓi

We shall conclude

,)( iΓi

iΓi

yxyx which is equivalent to .)( i

Γii

Γiyxyx

This completes the proof of equation (50).

To establish (51) we first realize, as the arrow operation is antitone in the first variable,

.each for ,)( Γixyxy iiΓi

Therefore ).()(

xyxy i

Γii

Γi

Conversely, ,each for ,)( Γixyxy iiΓi

therefore

,each for ,)( Γixxyy iΓi

i thus

,each for ,)( Γixxyy iΓi

i hence

,)( xxyy iΓi

iΓi

whence

,)]([

xxyy iΓi

iΓi

which is equivalent to

.)()(

xyxy iΓi

iΓi

The proof is complete.

Eighth exercise. Prove in a complete MV-algebra ).( )52(

iΓi

iΓi

yxyx

Ninth exercise. Prove in a complete MV-algebra .)()( )53( *

*

i

Γii

Γiyy

Page 13: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

An element b of an MV-algebra L is called an n-divisor of an element a of L, if

. where, and ))1(( times

**

n

bbnbanbbbna

If all elements have n-divisors for all natural n, then L is called divisible. An MV-algebra L is called injective if it is complete and divisible. We will see that the six axioms of an injective MV-algebra are sufficient to construct fuzzy IF-THEN inrefence systems.A canonical example of an injective MV-algebra is the Lukasiewicz algebra defined onthe real unit interval [0,1]: 1 = 1, x* = 1 – x, x→y = min{1, 1 – x + y}.

Di Nola and Sessa proved in 1995 that an MV-algebra L is injective if, and only if Lis isomorphic to F(L), where F(L) is the MV-algebara of all continous [0,1]-valuedfunctions on the set of all maximal ideals of L, and

1(M) = 1, (f→g)(M) = min{1, 1 – f (M) + g(M)}, f*(M) = 1 – f(M),for any maximal ideal M of L.

Tenth exercise. Write the MV-operations on the Lukasiewicz structure, that is

].[, where ...)()(

... ...

... ...

0,1yxxyyxyx

yxyx

yxyx

Page 14: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Proposition 5. In an injective MV-algebra L, any n-divisor is unique.

Proof. It is enough to show that the statement holds in any injective MV-algebra F(L).To this end, let ),(LFf n a natural number and g, h two n-divisors of f. Let M bea maximal ideal of L. If f(M) = a < 1, then n[g(M)] = (ng)(M) = a = (nh)(M) = n[h(M)].Thus, g(M) = h(M). Now assume f(M) = 1. Then

).()()()()()()()()( ** M1M10M1MMM1 gngngnfgg If (n-1)g(M) would be equal to 1, then g(M) should be equal to 0, which it is clearly not.

Therefore (n-1)g(M) < 1.Similarly (n-1)h(M) = 1-h(M) < 1. Let a counter assumptiong(M) < h(M) hold. Then ,)()()()()() ** 1 M1MMM1 gnghh(n

which implies a contradiction h(M) < g(M). An assumption h(M) < g(M) leads to a similar contradiction, too.Therefore h(M) = g(M). We conclude h = g and the proof is complete.

By Proposition 5, we may denote the unique n-divisor of an element a by a/n.

./)()]/)()(()([)]/)()(()([ ** nfnfnfnfnf MM1M11M1M

For any maximal ideal M of an injective MV-algebra L, it holds that n(f(M)/n) = f(M), moreover,

We therefore conclude (f(M)/n) = f/n(M), that is, in F(L),

’map first, then divide equals to divide first, then map’.

Lecture III

Page 15: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Eleventh exercise. Prove that in the Lukasiewicz structure,

.

then,,,for if

111

n

ii

n

ii

n

ii

iii

cba

nicba

n1

n1

n1

1 ,

Clearly, in the Lukasiewicz structure, we have

},{min},{min1

n

ii

n

i

in ann

a

n

a

n

a

11

111

Thus, in F(L),

L.n

h

n

h

n

h

n

g

n

f

n

g

n

g

n

f

n

f

nihg

n

i

i

i

i

i

i

nn

iii

of ideal maximalany is where),(

)()()(

)(

,then ,,,for if

1

11

MM

MMM

M

1 ,f

n

1

n

1

n

1

Summarizing

Proposition 6. In any injective MV-algebra L,

.

then,,,for if

111

n

c

n

c

n

b

n

b

n

a

n

a

nicba

nnn

iii

1 ,

Page 16: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

Definition 2. Let L be an injective MV-algebra and let A be a non-void set. A fuzzy similarity S on A is such a binary fuzzy relation that, for each x, y, and z in A,(i) S(x,x) = 1 (everything is similar to itself),(ii) S(x,y) = S(y,x) (fuzzy similarity is symmetric),(iii) S(x,y)○S(y,z) ≤ S(x,z) (fuzzy similarity is weakly transitive).

Recall an L-valued fuzzy subset X of A is an ordered couple (A,μX), where the member-ship function μX:A→L tells the degree to which an element a in A belongs to the fuzzysubset X.

Given a fuzzy subset (A,μX), define a fuzzy relation S on A by (54) S(x,y) = μX(x)↔μX(y).

This fuzzy relation is trivially symmetric, by (6) it is reflexive and, by (2), transitive. So,Any fuzzy set generates a fuzzy similarity [this is true for L being any residuated lattice]

Proposition 7. Consider n injective MV-algebra L valued fuzzy similariteis Si, i = 1,...,n on a set A. Then a fuzzy binary relation S on A defined by

n

yxS

n

yxSyxS n ),(),(),( 1

is an L valued fuzzy similarity on A. More generally,any weighted mean SIM is an L valued fuzzy similarity,where

.,,),(),(

),(1

N 11

i

n

ii

nn mmMM

yxSm

M

yxSmyxSIM

Proof. (i) & (ii) obvious,(iii) by Proposition 6.Example 1 Countries, Example 2 Functionality

Page 17: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

The idea of partial similarity is not new. Indeed, in 1988 Niiniluoto quoted from Mill (1843) by defining: If two objects A and B agree on k attributes and disagree on m attributes, then the number

mk

kBAsim ),( can be taken to measure the degree of

similarity or partial identity between A and B. Obviously, sim is a reflexive and symmetric fuzzy relation. It is weakly transitive with respect to the Lukasiewicz t-norm(and, therefore, can be considered as an injective MV-algebra valued similarity). To see this, assuming there are N attributes, study the following Venn-diagram:A B

C

m p

q

k

s rt

It is easy to see that k + t + r ≤ N, 0 ≤ s.Then we have

),(),(),( CAsimCBsimBAsim

1 N

ts

N

rt

N

tk

tsNrttk ,Nsrtk which holds true.

It is worth noting that, among all BL-algebras (in particular, among continuous t-norms)injective MV-algebras are the only structures where ’the average of similarities is asimilarity’. Therefore the following consideration can be done only in such a structure.

Page 18: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

An Algorithm to Construct Fuzzy IF-THEN Inference Systems

Let us now return to our starting point, a fuzzy rule based system

Rule 1: IF x1 is in A11 and x2 is in A12 and .... and xm is in A1m THEN y is in B1

Rule 2: IF x1 is in A21 and x2 is in A22 and .... and xm is in A2m THEN y is in B2

* * *Rule n: IF x1 is in An1 and x2 is in An2 and .... and xm is in Anm THEN y is in Bn

Here all Aij.s and Bj are fuzzy but can be crips actions, too. As usual, it is not necessarythat the rule base is complete, some rule combinations can be missing without causingany difficulties. It is also possible that different IF-part causes equal THEN-part, but itis not possible that a fixed IF-part causes two different THEN-parts. We will not need any kind of defuzzification methods, everything is based on an experts knowledge and properties of injective MV-algebra valued similarity.Step 1. Create the dynamics of the inference system, i.e. define the IF-THEN rules andgive shapes to the corresponding fuzzy sets.

Step 2. If necassary, give weights to various IF-parts to emphasize their importance.

Step 3. List the rules with respect to the mutual importance of their IF-parts.

Step 4. For each THEN-part, give a criteria on how to distinguish outputs with equaldegree of membership.

Page 19: Many-valued Similarity - Theory and Applications of Fuzzy Reasoning Esko Turunen Tampere University of Technology Finland

A general framework for the inference system is now ready. Asssume then that we have an actual input Actual = (X1,...,Xm). A corresponding outputY is counted in the following way.(1) Consider each IF-part of each rule as a crisp case, that is μAij

(xj) = 1 holds.

(2) Count the degree of similarity between Actual and the IF-part of Rule i, i = 1,...,n. Since μAij

(Xj)↔μAij(xj) = μAij

(Xj)↔1 = μAij(Xj), we only need to calculate averages

or weighted averages of membership degrees!(3) Fire an output Y such that μBk

(Y) = Similarity(Actual, Rule k) corresponding to the

greatest similarity degree between the input Actual and the IF-part of a Rule k. If such a maximal rule is not unique, then use the preference list given in Step (3), and if there are several such outputs Y, use a creteria given in Step (4).

In the rest part of the lecture deals with real world case studies where wehave applied the above metodology and algorithm.

Note that counting the actual output can be viewed as an instance of Generalized Modus Ponens in the sense of (injective MV-algebra valued) Lukasiewicz-Pavelka logic;

ba

baRGMP

,,

,

where α corresponds to the IF-part of a Rule, β corresponds to the THEN-part of the Rule, a is the value Similarity(Actual, Rule k) and b = 1. This gives a many-valued logicbased theoretical justification to fuzzy inference.