16-08-05prof. pushpak bhattacharyya, iit bombay 1 cs 621 artificial intelligence lecture 7 -...

21
16-08-05 Prof. Pushpak Bhattachary ya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy Logic (Start)

Upload: jessie-manning

Post on 17-Jan-2016

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

1

CS 621 Artificial Intelligence

Lecture 7 - 16/08/05

Prof. Pushpak Bhattacharyya

Fuzzy Set (contd)

Fuzzy Logic (Start)

Page 2: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

2

Fuzzy Subset

U = {1, 2, 3, 4,….,10}A = {1, 2, 3, 4, 5}B = {2, 3, 4}B A in CRISP SET THEORY

A(x) >= B(x), xIn terms of membership predicateCrisp subsethood

S1(x) <= S2(x), x

Page 3: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

3

Geometric Interpretation

(0,1)(1,1)

(0,0) (1,0)

A

B1

B2 B3

x2

x1

U = {x1 , x2}

Bis are such that

Bi(x) <= A(x), x

Page 4: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

4

Geometric Interpretation (Contd 1)

• The points within the hypercube for which A is the upper right corner are the subsets of A.

• Space defined by the square is the power set of A.

• Formulation of ZADEH, classical fuzzy set theory

• For B to be a subset of A, B(x) <= A(x), x.

This means B P(A) crisply. A

B

Page 5: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

5

Geometric Interpretation (Contd 2)

• Each Bi is a subset of A to some degree.

A

B1B2

B3

• Result of Union, Intersection, Complement is a SET

• Subsethood is a question

Page 6: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

6

Fuzzy Definition of Subsethood

• S(B,A) = subsethood of B wrt A

= 1 – ∑x max(0, B(x) – A(x))

∑x B(x)

• Question – Can S(B,A) be 0.

Page 7: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

7

Theorem

• S(B,A) = m(A B) m(B)

m(S) = cardinality of S

= ∑xS(x)

Page 8: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

8

Proof of the Theorem

Proof:

RHS = 1 – ∑xmax(0, B(x) – A(x))

∑xB(x)

= ∑x B(x) – ∑xmax(0, B(x) – A(x))m(B)

Page 9: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

9

Proof of the Theorem (Contd)

= ∑xmin(A(x), B(x))

m(B)

= m(A B)

m(B)

= LHS

Page 10: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

10

Entropy of Subsethood

E(A) = m(A Ac) m(A Ac)

S(B,A) = m(A B) m(B)

S(A Ac, A Ac) = m((A Ac) (A Ac)) m(A Ac)

= m(A Ac) = E(A) m(A Ac)

Page 11: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

11

Entropy of Fuzzy Set

• Entropy of fuzzy set is the degree by which A Ac is a subset of A Ac

• Entropy is a measure by which WHOLE IS A SUBSET of its OWN PART !!!

• Subsethood in non-classical fuzzy logic is a degree statement. This influences the notion of Implication.

Page 12: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

12

Fuzzy Logic

Set Theory Logic

Set S S(x)

S1 S2 S1(x) ν S2(x)

S1 S2 S1(x) Λ S2(x)

S1 S2 S1(x) S2(x)

Page 13: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

13

Definitions of Logic Operations

Let P1 and P2 be fuzzy logic variables /predicates.

0 <= t(P1) <= 1

0 <= t(P2) <= 1 Fuzzy Logic

Page 14: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

14

Fuzzy Operations

• Fuzzy ν :

max (t(P1), t(P2))

• Fuzzy Λ :

min(t(P1), t(P2))

• Fuzzy ~ :

1 – t(P)

Page 15: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

15

Implication

• LUKISEWITZ LOGIC

Many multi-valued logic in 1930

t(P1) t(P2)

= min (1, 1-t(P1) + t(P2))

Page 16: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

16

Inferencing

• Modus Ponens

Given P1 & P1 P2 conclude P2

t(P1) = 1,

t(P1 P2) = 1

conclude t(P2) = 1

- classical logic

Page 17: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

17

Modus Tolens

• Given ~P2 and P1 P2 conclude ~P1

i.e t(P2) = 0,

t(P1 P2) = 1

Conclude t(P2) = 0

- classical logic

Page 18: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

18

In Fuzzy Logic

We are given

t(P1) = a, 0<= a <= 1

t(P1 P2) = b, 0<= b <=1

What can we say for t(P2)

t(P1 P2) =min(1, 1 – t(P1) + t(P2))By definition Luk. system of logicFrom given values

t(P1 P2) = min(1, 1 – a + t(P2))

t(P1 P2) = b

Page 19: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

19

Case 1

b = min(1, 1 – a + t(P2))

b = 1

1 – a + t(P2) >= 1

or t(P2) >= a

- case of complete truth transfer

Page 20: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

20

Case 2b < 1

1 – a + t(P2) = b

or t(P2) = a + b – 1

Combining 1 and 2

t(P2) = a + b -1

But this allows t(P2) to be < 0

t(P2) = max(0, a + b -1)

Fuzzy modus ponens.

Page 21: 16-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 7 - 16/08/05 Prof. Pushpak Bhattacharyya Fuzzy Set (contd) Fuzzy

16-08-05 Prof. Pushpak Bhattacharyya, IIT Bombay

21

Fuzzy Modus Tolens

t(P1 P2) = b

t(P2) <= a, 0<=a<=1

What is t(P1)

Exercise: Deduce expression for fuzzy modus tolens