Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Asst. Prof. Dr. Sukanya Pongsuparb Dr. Srisupa Palakvangsa Na Ayudhya Dr. Benjarath Pupacdi SCCS451 Artificial Intelligence Week 9.

Similar presentations


Presentation on theme: "1 Asst. Prof. Dr. Sukanya Pongsuparb Dr. Srisupa Palakvangsa Na Ayudhya Dr. Benjarath Pupacdi SCCS451 Artificial Intelligence Week 9."— Presentation transcript:

1 1 Asst. Prof. Dr. Sukanya Pongsuparb Dr. Srisupa Palakvangsa Na Ayudhya Dr. Benjarath Pupacdi SCCS451 Artificial Intelligence Week 9

2 2 Traditional Logic What is Fuzzy Logic? Boolean Logic VS Fuzzy Logic What is Fuzzy Set? Linguistic Variable and Hedges Operations of Fuzzy Sets Properties of Fuzzy Sets

3 3 Is it hot or cold? Do you like playing crossword? Do you like Harry Potter or not? ONEZERO Only two values

4 4 HOTHOT COLD Do not Like Harry Do not Like Harry

5 5 Only two inputs: zero and one Only two outputs: zero and one

6 6 Definitely easy Really easy Very very easy Very easy Easy Quite easy

7 7 You could possibly have a cold. You are certainly have chicken pox. It is likely that you may have ไข้หวัด 2009. It is quite likely that I cannot go to a party It looks like it is going to rain I am certain that Mum will not like this bag

8 8

9 9 very really quite more or less very extremely VAGUE & AMBIGUOUS

10 10 Fuzzy Logic Unclear The formal systematic study of the principles of valid inference and correct reasoning a form of multi-valued logic derived from fuzzy set theory to deal with reasoning that is approximate rather than precise. (Wikipedia) a theoretical system used in mathematics, computing and philosophy to deal with statements which are neither true nor false (dictionary.cambridge.org)

11 11 “Fuzzy logic” is not logic that is fuzzy but logic that is used to describe fuzziness

12 12 “Fuzzy logic” is determined as a set of mathematical principles for knowledge representation based on degrees of membership rather than on crisp membership of classical binary logic Zadeh 1965 (Master of Fuzzy Logic)

13 13 Boolean LogicFuzzy Logic Two – Valued Logic: Zero & One Multi – Valued Logic Sharp boundary (crisp) Range of values Degree of memberships degree of truth Model senses of words

14 14 Tall Short

15 15 X = Universe of Discourse Y = Membership Value

16 16 Q: Does the Cretan philosopher tell the truth when he asserts that “All Cretans always lie’? Boolean Logic: This assertion contains a contradiction. Fuzzy Logic: The philosopher does and does not tell the truth! The barber of a village gives a hair cut only to those who do not cut their hair themselves? Q: Who cuts the barber’s hair? Boolean Logic: This assertion contains a contradiction. Fuzzy Logic: The barber cuts and does not cut his own hair!

17 17 Use a concept of Set to represent the idea of classical set and fuzzy set

18 18 f A (x) called the characteristic function of A Principle of Dichotomy: a classic set theory imposes a sharp boundary f A (x): X  {0, 1}, where

19 19  A(x): X  [0, 1] where  A(x) = 1 if x is totally in A;  A(x) = 0 if x is not in A; 0 <  A(x) < 1 if x is partly in A.  A(x) : membership function of set A membership value (0<= degree <=1): shows the degree of membership Basic idea: an element belongs to a fuzzy set with a certain degree of membership fuzzy set is a set with fuzzy boundaries

20 20 1.Define the membership function 2.Perform knowledge acquisition from… 1)Single expert 2)Multiple experts

21 21 1.Define the membership function: short, average, tall 2.Knowledge Acquisition 1)Fuzzy Sets: short, average, tall 2)Universe of Discourse (height): short, average, tall

22 22

23 23 Representation of crisp and fuzzy subset of X

24 24 Crisp Set Let X be the universe of discourse X = {x 1, x 2, x 3, x 4, x 5 } Let A be a crisp subset of X, A = {x 2, x 5 } A can be described using a set of pair {(x i,  A(x i )} where  A(x i ) is the membership function A = { (x 1,0), (x 2,1), (x 3,0), (x 4,0), (x 5,0) }

25 25 Fuzzy Set A can be a fuzzy subset of X if and only if, A = { (x,  A(x) }x Є X,  A(x): X  [0, 1] it can be re-written as A = {  A(x 1 ) / x 1 }, {  A(x 2 ) / x 2 }, ….., {  A(x n ) / x n } e.g. Tall man = (0/180, 0.5/185, 1/190) Short man = (1/160, 0.5/165, 0/170)

26 26 Fuzzy sets must be represented as functions and then mapped the elements of the sets to their degree of membership Examples of functions:- Sigmoid Gaussian Pi In practice, most applications use linear fit functions (shown in Slide No. 20)

27 27 Sigmoid function Gaussian function Pi function

28 28 Trapezoidal function Triangular function

29 29 Triangular function The trapezoidal curve is a function of a vector x, and depends on four scalar parameters a, b, c, and d, as given by Trapezoidal function

30 30 The triangular curve is a function of a vector x, and depends on three scalar parameters a, b, and c, as given by Triangular function

31 31 Linguistic Variables & Hedges

32 32 IF THEN value object value object Examples: IF wind is strong THEN sailing is good IF speed is slow THEN stopping_distance is short IF project_duration is long THEN completion_risk is high Linguistic variable Linguistic value * linguistic variable == fuzzy variable

33 33 Andy quite likes Thai food hedges Mary looks very much like her mother Jim has been to several attractions in Thailand Hedges: terms that modify the shape of fuzzy sets e.g. very, somewhat, quite, more or less, and slightly

34 34 Hedges can modify verbs, adjectives, adverbs, or whole sentences. They are used as All-purpose modifiers: very, quite, extremely Truth-values: quite true, mostly false Probabilities: likely, not very likely Quantifiers: most, several, few Possibilities: almost impossible, quite possible

35 35 A man who is 185 cm tall is a member of the tall men set with a degree of membership of 0.5. He is also a member of the very tall men set with a degree of 0.15.

36 36 There are two types of “hedges”:- Concentration reduce the size of the fuzzy set e.g. very, very very, extremely, slightly decrease the degree of membership Dilation expand the size of the fuzzy set e.g. more or less, somewhat Increase the degree of the membership Intensification Intensifies the meaning of the whole sentence e.g. indeed Increase the degree of the membership above 0.5 and decrease those below 0.5

37 37 Concentration

38 38 Concentration dilation intensification

39 39 To expand or reduce the subset by modifying the degree of membership

40 40 If Alice has a 0.86 membership in the set of tall girls the equation of “very” is..  A(x) of very = [  A(x)] 2 So Alice will have a [0.86] 2 = 0.7396 membership in the set of very tall girls

41 41 If Alice has a 0.86 membership in the set of tall girls the equation of “very very” is..  A(x) of very very = [  A(x) of very] 4 = [  A(x)] 4 So Alice will have a [0.86] 4 = 0.5470 membership in the set of very very tall girls

42 42 The classical set theory developed in the late 19th century by Georg Cantor describes how crisp sets can interact. These interactions are called operations: - Complement - Containment - Intersection - Union

43 43 Complement is the opposite set of a given set e.g. if a set is X, the complement set is NOT X Questions:- Crisp Sets: Who does not belong to the set? Fuzzy Sets: How much do elements not belong to the set?

44 44 Equation  A(x) = 1   A(x) Example tall man = (0/180, 0.25/182.5, 0.5/185, 0.75/187.5, 1/190) NOT tall man = (1/180, 0.75/182.5, 0.5/185, 0.25/187.5, 0/190)

45 45 Containment: one set is the subset of another set Questions:- Crisp Sets: Which sets belong to which other sets? Fuzzy Sets: Which sets belong to other sets?

46 46 In crisp set, all elements of a subset entirely belong to a larger set i.e. the degree of membership is equal to 1. In fuzzy sets, each element can belong less to the subset than to the larger set. Example tall man = (0/180, 0.25/182.5, 0.5/185, 0.75/187.5, 1/190) very tall man = (0/180, 0.06/182.5, 0.25/185, 0.56/187.5, 1/190)

47 47 Intersection: the area where sets overlap In crisp sets, an element must belong to both sets In fuzzy sets, an element may partly belong to both sets with different memberships Questions:- Crisp Sets: Which element belongs to both sets? Fuzzy Sets: How much of the element is in both sets?

48 48 Equation  A  B(x) = min [  A(x),  B(x)] =  A(x)   B(x), where x  X tall man = (0/165, 0/175, 0.0/180, 0.25/182.5, 0.5/185, 1/190) average tall man = (0/165, 1/175, 0.5/180, 0.25/182.5, 0.0/185, 0/190) tall man  average man = (0/165, 0/175, 0.0/180, 0.25/182.5, 0.0/185, 0/190)

49 49

50 50 Union: the integration area of all sets In crisp sets, an element can belong to either sets. In fuzzy sets, the union is the largest membership value of the element in either set. Questions:- Crisp Sets: Which element belongs to either set? Fuzzy Sets: How much of the element is in either set?

51 51 Equation  A  B(x) = max [  A(x),  B(x)] =  A(x)   B(x), where x  X tall man = (0/165, 0/175, 0.0/180, 0.25/182.5, 0.5/185, 1/190) average tall man = (0/165, 1/175, 0.5/180, 0.25/182.5, 0.0/185, 0/190) tall man  average man = (0/165, 1/175, 0.5/180, 0.25/182.5, 0.5/185, 1/190)

52 52

53 53 The properties of set used in crisp sets can also be used in fuzzy sets Frequently used properties:- Commutativity Associatively Distributivity Idempotency Identity Involution Transitivity De Morgan’s Laws

54 54 Commutativity A  B = B  A Associatively A  (B  C) = (A  B )  C A  (B  C) = (A  B )  C Distributivity A  (B  C) = (A  B )  (A  C) A  (B  C) = (A  B )  (A  C)

55 55 Idempotency A  A = A A  A = A Identity A  Ф = A A  X = A A  Ф = Ф A  X = X where Ф is an empty set and X is a superset of A.

56 56 Involution  (  A) = A Transitivity If (A ⊂ B)  (B ⊂ C) then A ⊂ C De Morgan’s Laws  (A  B) =  A   B  (A  B) =  A   B

57 57

58 58 Properties and hedges can be used to obtain a variety of fuzzy sets from the existing ones. Assume that we have a fuzzy set A of tall men, we can derive a fuzzy set of very tall man:- Given fuzzy set A of tall men =  A (x) very tall men = [  A (x)] 2 NOT very tall men   A (x) = 1 - [  A (x)] 2

59 59 Given fuzzy set A of raining day =  A (x) fuzzy set B of cold day =  B (x) Derive a fuzzy set C of extremely cold and not raining day Derive a fuzzy set D of not very very cold or slightly raining day


Download ppt "1 Asst. Prof. Dr. Sukanya Pongsuparb Dr. Srisupa Palakvangsa Na Ayudhya Dr. Benjarath Pupacdi SCCS451 Artificial Intelligence Week 9."

Similar presentations


Ads by Google