Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS621: Artificial Intelligence

Similar presentations


Presentation on theme: "CS621: Artificial Intelligence"— Presentation transcript:

1 CS621: Artificial Intelligence
Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 11– Fuzzy Logic: Inferencing

2 Representation of Fuzzy sets
Let U = {x1,x2,…..,xn} |U| = n The various sets composed of elements from U are presented as points on and inside the n-dimensional hypercube. The crisp sets are the corners of the hypercube. μA(x1)=0.3 μA(x2)=0.4 (0,1) (1,1) x2 (x1,x2) U={x1,x2} x2 A(0.3,0.4) (1,0) (0,0) Φ x1 x1 A fuzzy set A is represented by a point in the n-dimensional space as the point {μA(x1), μA(x2),……μA(xn)}

3 Called the entropy of a fuzzy set
Degree of fuzziness The centre of the hypercube is the “most fuzzy” set. Fuzziness decreases as one nears the corners Measure of fuzziness Called the entropy of a fuzzy set Fuzzy set Farthest corner Entropy Nearest corner

4 (0,1) (1,1) x2 (0.5,0.5) A d(A, nearest) (0,0) (1,0) x1 d(A, farthest)

5 Distance between two fuzzy sets
Definition Distance between two fuzzy sets L1 - norm Let C = fuzzy set represented by the centre point d(c,nearest) = | | + |0.5 – 0.0| = 1 = d(C,farthest) => E(C) = 1

6 Definition Cardinality of a fuzzy set [generalization of cardinality of classical sets] Union, Intersection, complementation, subset hood

7 How to define subset hood?
Note on definition by extension and intension S1 = {xi|xi mod 2 = 0 } – Intension S2 = {0,2,4,6,8,10,………..} – extension How to define subset hood?

8 Meaning of fuzzy subset Suppose, following classical set theory we say
if Consider the n-hyperspace representation of A and B (0,1) (1,1) A Region where x2 . B1 .B2 .B3 (0,0) (1,0) x1

9 This effectively means
CRISPLY P(A) = Power set of A Eg: Suppose A = {0,1,0,1,0,1,…………….,0,1} – 104 elements B = {0,0,0,1,0,1,……………….,0,1} – 104 elements Isn’t with a degree? (only differs in the 2nd element)

10 Fuzzy definition of subset
Measured in terms of “fit violation”, i.e. violating the condition Degree of subset hood = 1- degree of superset hood = m(A) = cardinality of A

11 Show the relationship between entropy and subset hood Exercise 2:
We can show that Exercise 1: Show the relationship between entropy and subset hood Exercise 2: Prove that Subset hood of B in A

12 Fuzzy sets to fuzzy logic
Forms the foundation of fuzzy rule based system or fuzzy expert system Expert System Rules are of the form If then Ai Where Cis are conditions Eg: C1=Colour of the eye yellow C2= has fever C3=high bilurubin A = hepatitis

13 In fuzzy logic we have fuzzy predicates
Classical logic P(x1,x2,x3…..xn) = 0/1 Fuzzy Logic P(x1,x2,x3…..xn) = [0,1] Fuzzy OR Fuzzy AND Fuzzy NOT

14 Fuzzy Implication Many theories have been advanced and many expressions exist The most used is Lukasiewitz formula t(P) = truth value of a proposition/predicate. In fuzzy logic t(P) = [0,1] t( ) = min[1,1 -t(P)+t(Q)] Lukasiewitz definition of implication

15 Eg: If pressure is high then Volume is low
High Pressure Pressure

16 Fuzzy Inferencing

17 Fuzzy Inferencing: illustration through inverted pendulum control problem
Core The Lukasiewitz rule t( ) = min[1,1 + t(P) – t(Q)] An example Controlling an inverted pendulum θ = angular velocity i=current Motor

18 The goal: To keep the pendulum in vertical position (θ=0)
in dynamic equilibrium. Whenever the pendulum departs from vertical, a torque is produced by sending a current ‘i’ Controlling factors for appropriate current Angle θ, Angular velocity θ. Some intuitive rules If θ is +ve small and θ. is –ve small then current is zero If θ is +ve small and θ. is +ve small then current is –ve medium

19 Control Matrix θ θ. -ve med -ve small +ve small +ve med Zero -ve med
Region of interest Zero Zero +ve small -ve small Zero +ve small -ve small -ve med Zero +ve med

20 Each cell is a rule of the form
If θ is <> and θ. is <> then i is <> 4 “Centre rules” if θ = = Zero and θ. = = Zero then i = Zero if θ is +ve small and θ. = = Zero then i is –ve small if θ is –ve small and θ.= = Zero then i is +ve small if θ = = Zero and θ. is +ve small then i is –ve small if θ = = Zero and θ. is –ve small then i is +ve small

21 Profiles Linguistic variables Zero +ve small -ve small 1 -ε3 ε3 -ε2 ε2
Quantity (θ, θ., i)

22 Inference procedure Read actual numerical values of θ and θ.
Get the corresponding μ values μZero, μ(+ve small), μ(-ve small). This is called FUZZIFICATION For different rules, get the fuzzy I-values from the R.H.S of the rules. “Collate” by some method and get ONE current value. This is called DEFUZZIFICATION Result is one numerical value of ‘i’.


Download ppt "CS621: Artificial Intelligence"

Similar presentations


Ads by Google