Presentation is loading. Please wait.

Presentation is loading. Please wait.

19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 8 - 19/08/05 Prof. Pushpak Bhattacharyya Fuzzy Logic Application.

Similar presentations


Presentation on theme: "19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 8 - 19/08/05 Prof. Pushpak Bhattacharyya Fuzzy Logic Application."— Presentation transcript:

1 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 8 - 19/08/05 Prof. Pushpak Bhattacharyya Fuzzy Logic Application

2 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 2 NLP -> Fuzzy Logic Language statements imprecise Linguistic variable -> Adjective Hedges -> Adverb

3 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 3 Example Problem Assume 4 types of Fuzzy Predicates applicable to persons (age, height, weight and level of education). The membership functions are of the basic form 1/(1+e -x ), but of appropriate shape and orientation.

4 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 4 Example (Contd 1) Determine the truth values of : a) A person X is highly educated and not very young is very true. b) X is very young, tall, not heavy and somewhat educated is true c) X is more of less old or highly educated is fairly true

5 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 5 Example (Contd 2) d) X is very heavy or old or not highly educated is fairly true e) X is short, not very young and highly educated is very true ( assume that the level of education has 4 values: Elementary school, High school, College, PHD)

6 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 6 Basic Profile

7 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 7 To Adjust For Different Linguistic Variables

8 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 8 To Find k 1 and k 2 we need, x 1 = 0 y 1 = 0.01 x 2 = ? y 2 = 0.99

9 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 9 y = 1/(1+e -k 1 (x-k 2 ) ) => (1-y)/y = e -k 1 (x-k 2 ) => k 1 (x - k 2 ) = ln(y/1-y) call y/1-y = α Finding α

10 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 10 Solving for k 1 & k 2 k 1 (x-k 2 ) = ln α So, k 1 x – k 1 k 2 = ln α at k 1 x 1 – k 1 k 2 = ln α 1 --- (1) where α 1 = y 1 /1-y 1

11 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 11 Solving for k 1 & k 2 (Contd 1) k 1 x 2 - k 1 k 2 = ln α 2 ---(2) α 2 = y 2 / 1- y 2 Solving from k 1 and k 2 k 1 = (1/(x 2 - x 1 ) ) ln ( ((1-y 1 )/y 1 )/((1-y 2 )/y 2 ))

12 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 12 Solving for k 1 & k 2 (Contd 2) k 2 = x 2 – (ln α 2 ) / k 1 Lets use x 1 = 0, y 1 = 0.01, x 2 =?, y 2 = 0.99 k 1 = 2/x 2 ln 99 = 2* 4.6 / x 2 = 9.2 /x 2

13 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 13 Solving for k 1 & k 2 (Contd 3) k 2 = x 2 /2 k 1 = 9.2 / x 2 k 2 = x 2 / 2

14 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 14 Profile of Old x 1 = 0, y 1 = 0.01 x 2 = 80 yrs y 2 = 0.99 k 1 = 9.2 / 80 = 0.1 k 2 = 40 Profile of old y = 1/(1+e - 0.1(x - 40) )

15 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 15 Profile of Tall x 1 = 0, y 1 = 0.01 x 2 =6ft, y 2 = 0.99 k 1 = 9.2 / 6 = 1.5 k 2 = 6/2 = 3 Profile of Tall, y = 1/(1+e -1.5(x - 3) )

16 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 16 Profile of Heavy x 1 = 0, y 1 = 0.01 x 2 = 100kg yrs, y 2 = 0.99 k 1 = 9.2 / 100 = 0.1 k 2 = 100/2 = 50 Profile of Heavy, y = 1/(1+e - 0.1(x - 50) )

17 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 17 Profile of Educated school = 0.25, high School = 0.5, college 0.75, PhD = 1.00 x 1 = 0, y 1 = 0.01, x 2 =1 yrs, y 2 = 0.99 Profile: y = 1/(1+e - 9.2 (x – 0.5 ) )

18 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 18 Old Tall Heavy Educated 1/(1+e -k 1 (x-k 2 ) )

19 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 19 True y = 1/(1+e -k 1 (x-k 2 ) ) k 1 and k 2 values are chosen arbitrarily

20 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 20 a) X is highly educated and not very young is very true l = Level of education μ 2 true (μ) μ = min [μ 2 educated (l), 1- ( 1- μ old (age) ) ) 2 μ for Different Configurations - 1

21 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 21 μ for Different Configurations - 2 b) X is very young, tall, not heavy and somewhat educated is true μ true (μ) μ = min ( ( 1 - μ old (age)) 2, μ tall (ht), 1- μ heavy (wt), (μ edu (L) ) 1/2 )

22 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 22 μ for Different Configurations - 3 c) X is more or less old or highly educated is fairly true (μ true (μ ) ) 1.5 μ = max ( (μ old (age)) 1/2, μ 2 edu (l))

23 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 23 μ for Different Configurations - 4 d) X is very heavy or old or not highly educated is fairly true (μ true (μ) ) 1.5 μ = max (μ old (age), μ 2 heavy (wt ), 1 - μ 2 edu (l))

24 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 24 μ for Different Configurations - 5 e) X is short, not very young and highly educated is very true μ 2 true (μ) μ = min [1 – (1 - μ old (age)) 2, μ 2 edu (l), 1 - μ tall (ht) ]

25 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 25 Question : How to actually read off values John: age: 35 ht : 5.8’ wt : 75 Kg education l : College

26 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 26

27 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 27 Fuzzy Inferencing Closely related to Fuzzy Expert Systems Expert Systems: Rules : Antecedent Consequent p q p 1  p 2  p 3  …. P n q i

28 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 28 Inferencing Forward ChainingBackward Chaining Supposed to prove the fact F Inferencing

29 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 29 Forward Chaining ( Data Driven) Given Facts are matched with LHS of rules RHS of satisfied rules are added to the fact base Stop when the required F comes to the fact base.

30 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 30 Backward Chaining ( Goal Driven) Start from F to see if it matches the RHS of any rule. LHS of matched Rule becomes the new goal. Stop when a fact is hit.

31 19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 31 Fuzzy Expert System Rules are in forms of linguistic variables. Example of “Inverted pendulum control”


Download ppt "19-08-05Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 8 - 19/08/05 Prof. Pushpak Bhattacharyya Fuzzy Logic Application."

Similar presentations


Ads by Google