CS621: Artificial Intelligence - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

CS621: Artificial Intelligence

Description:

In a process control situation, 'If the temperature is ... Distance between two fuzzy sets. L1 - norm. Let C = fuzzy set represented by the centre point ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 36
Provided by: cfd5
Category:

less

Transcript and Presenter's Notes

Title: CS621: Artificial Intelligence


1
CS621 Artificial Intelligence
  • Pushpak BhattacharyyaCSE Dept., IIT Bombay
  • Lecture 38 Fuzzy Logic

2
Uncertainty Studies
Uncertainty Study
Qualitative Reasoning
Information Theory based
Fuzzy Logic Based
Probability Based
Markov Processes Graphical Models
Probabilistic Reasoning
Entropy Centric Algos
Bayesian Belief Network
3
To-play-or-not-to-play-tennis data vs.
Climatic-Condition from Ross Quinlans paper on
ID3 (1986), C4.5 (1993)
4
(No Transcript)
5
Outlook
Cloudy
Sunny
Rain
Yes
Humidity
Windy
F
High
Low
T
No
No
Yes
Yes
6
Rule Base
  • R1 If outlook is sunny and if humidity is high
    then Decision is No.
  • R2 If outlook is sunny and if humidity is low
    then Decision is Yes.
  • R3 If outlook is cloudy then Decision is Yes.

7
Fuzzy Logic
8
Fuzzy Logic tries to capture the human ability of
reasoning with imprecise information
  • Models Human Reasoning
  • Works with imprecise statements such as
  • In a process control situation, If the
    temperature is moderate and the pressure is high,
    then turn the knob slightly right
  • The rules have Linguistic Variables, typically
    adjectives qualified by adverbs (adverbs are
    hedges).

9
Underlying Theory Theory of Fuzzy Sets
  • Intimate connection between logic and set theory.
  • Given any set S and an element e, there is a
    very natural predicate, µs(e) called as the
    belongingness predicate.
  • The predicate is such that,
  • µs(e) 1, iff e ? S
  • 0, otherwise
  • For example, S 1, 2, 3, 4, µs(1) 1 and
    µs(5) 0
  • A predicate P(x) also defines a set naturally.
  • S x P(x) is true
  • For example, even(x) defines S x x is
    even

10
Fuzzy Set Theory (contd.)
  • Fuzzy set theory starts by questioning the
    fundamental assumptions of set theory viz., the
    belongingness predicate, µ, value is 0 or 1.
  • Instead in Fuzzy theory it is assumed that,
  • µs(e) 0, 1
  • Fuzzy set theory is a generalization of classical
    set theory also called Crisp Set Theory.
  • In real life belongingness is a fuzzy concept.
  • Example Let, T set of tall people
  • µT (Ram) 1.0
  • µT (Shyam) 0.2
  • Shyam belongs to T with degree 0.2.

11
Linguistic Variables
  • Fuzzy sets are named by Linguistic Variables
    (typically adjectives).
  • Underlying the LV is a numerical quantity
  • E.g. For tall (LV), height is numerical
    quantity.
  • Profile of a LV is the plot shown in the figure
    shown alongside.

µtall(h)
1
0.4
4.5
1 2 3 4 5 6
0
height h
12
Example Profiles
µpoor(w)
µrich(w)
wealth w
wealth w
13
Example Profiles
µA (x)
µA (x)
x
x
Profile representing moderate (e.g. moderately
rich)
Profile representing extreme
14
Concept of Hedge
  • Hedge is an intensifier
  • Example
  • LV tall, LV1 very tall, LV2 somewhat tall
  • very operation
  • µvery tall(x) µ2tall(x)
  • somewhat operation
  • µsomewhat tall(x) v(µtall(x))

tall
somewhat tall
1
very tall
µtall(h)
0
h
15
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)
Ux1,x2
x2
A(0.3,0.4)
(1,0)
(0,0)
F
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)
16
  • 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
17
(0,1)
(1,1)
x2
(0.5,0.5)
A
d(A, nearest)
(0,0)
(1,0)
x1
d(A, farthest)
18
Definition Distance between two fuzzy sets
L1 - norm
Let C fuzzy set represented by the centre
point d(c,nearest) 0.5-1.0 0.5 0.0
1 d(C,farthest) gt E(C) 1
19
Definition Cardinality of a fuzzy set
generalization of cardinality of classical sets
Union, Intersection, complementation, subset hood
20
Note on definition by extension and intension S1
xixi mod 2 0 Intension S2
0,2,4,6,8,10,.. extension How to define
subset hood?
21
Meaning of fuzzy subset Suppose, following
classical set theory we say if Consider
the n-hyperspace representation of A and B
(1,1)
(0,1)
A
Region where
x2
. B1 .B2 .B3
(1,0)
(0,0)
x1
22
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 Isnt
with a degree? (only differs in the 2nd element)
23
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
24
We can show that Exercise 1 Show the
relationship between entropy and subset
hood Exercise 2 Prove that
Subset hood of B in A
25
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
C1Colour of the eye yellow C2 has fever C3high
bilurubin A hepatitis
26
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
27
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( ) min1,1 -t(P)t(Q)

Lukasiewitz definition of implication
28
Eg If pressure is high then Volume is low
High Pressure
Pressure
29
Fuzzy Inferencing
30
Fuzzy Inferencing illustration through inverted
pendulum control problem
Core The Lukasiewitz rule t( )
min1,1 t(P) t(Q) An example Controlling an
inverted pendulum
angular velocity
?
icurrent
Motor
31
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
32
Control Matrix
?
-ve med
-ve small
ve small
ve med
Zero
?.
-ve med
-ve small
Region of interest
ve med
ve small
Zero
Zero
-ve small
ve small
Zero
ve small
-ve med
-ve small
Zero
ve med
33
  • Each cell is a rule of the form
  • If ? is ltgt and ?. is ltgt
  • then i is ltgt
  • 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

34
  • Linguistic variables
  • Zero
  • ve small
  • -ve small
  • Profiles

1
ve small
-ve small
-e3
e3
e2
-e2
-e
e
Quantity (?, ?., i)
35
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.
Write a Comment
User Comments (0)
About PowerShow.com