Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Computational Intelligence

Parveen Malik
Assistant Professor
School of Electronics Engineering
KIIT University
Outline
• Fuzzy Inference system
• Extension Principle
• Linguistic Variable
• Fuzzy Relations
Fuzzy Inference system (FIS)
Time-Series Prediction

Automatic Control

Expert Systems Fuzzy Inference Data Classification


system

Pattern Recognition Robotics

Decision Analysis
Fuzzy Inference system (FIS)
Popular Computing frame work based upon
• Fuzzy set theory
• Fuzzy IF THEN Rules
• Fuzzy Reasoning
Extension Principle
• Extends crisp domains of mathematical expression to fuzzy domains.
• Generalizes a common point to point mapping of a function to a
mapping between fuzzy sets.

Suppose 𝑓 is a function from X to Y and A is fuzzy set on X defined as


𝝁𝑨 𝒙𝟏 𝝁𝑨 𝒙𝟐 𝝁𝑨 𝒙𝒏
𝑨= + +⋯
𝒙𝟏 𝒙𝟐 𝒙𝒏
Then the extension principle states that image of fuzzy set A under the
mapping 𝑓 ∙ can be expressed as a fuzzy set B
𝝁𝑨 𝒙𝟏 𝝁𝑨 𝒙𝟐 𝝁𝑨 𝒙𝒏
𝑩 = 𝒇(𝑨) = + +⋯
𝒚𝟏 𝒚𝟐 𝒚𝒏
Where 𝒚𝟏 = 𝒇 𝒙𝟏 , 𝒚𝟐 = 𝒇 𝒙𝟐 so on
Fuzzy Relations
• Binary fuzzy relations are fuzzy sets in 𝑋 × 𝑌 which map
each element in to membership grade 0 to 1.

Definition 1.1 Binary fuzzy relation


Let X and Y be two universe of discourse. Then
ℜ= 𝑥, 𝑦 , 𝜇𝑅 𝑥, 𝑦 | 𝑥, 𝑦 ∈ 𝑋 × 𝑌
is a binary fuzzy relation in 𝑋 × 𝑌.
Fuzzy Relations
Definition 1.2 Max-min composition
Let ℜ1 and ℜ1 be two fuzzy relations defined on 𝑋 × 𝑌 and
𝑌 × 𝑍 respectively. The max-min composition of ℜ1 and ℜ2 is
a fuzzy set defined by

𝕽𝟏 ∘ 𝕽𝟐 = 𝒙, 𝒛 , 𝐦𝐚𝐱 𝒎𝒊𝒏 𝝁𝕽𝟏 𝒙, 𝒚 , 𝝁𝕽𝟐 𝒚, 𝒛 |𝒙 ∈ 𝑿, 𝒚 ∈ 𝒀, 𝒛 ∈ 𝒁


𝒚
or
𝝁𝕽𝟏 ∘𝕽𝟐 = 𝐦𝐚𝐱 𝒎𝒊𝒏 𝝁𝕽𝟏 𝒙, 𝒚 , 𝝁𝕽𝟐 𝒚, 𝒛
𝒚
Fuzzy Relations
Definition 1.2 Max product composition
Let ℜ1 and ℜ1 be two fuzzy relations defined on 𝑋 × 𝑌 and
𝑌 × 𝑍 respectively. The max product composition of ℜ1 and
ℜ2 is a fuzzy set defined by

𝕽𝟏 ∘ 𝕽𝟐 = 𝒙, 𝒛 , 𝐦𝐚𝐱 𝝁𝕽𝟏 𝒙, 𝒚 ∗ 𝝁𝕽𝟐 𝒚, 𝒛 |𝒙 ∈ 𝑿, 𝒚 ∈ 𝒀, 𝒛 ∈ 𝒁


𝒚
or
𝝁𝕽𝟏 ∘𝕽𝟐 = 𝐦𝐚𝐱 𝝁𝕽𝟏 𝒙, 𝒚 ∗ 𝝁𝕽𝟐 𝒚, 𝒛
𝒚
Linguistic Variable
If the variable takes linguistic terms, it is called “Linguistic Variable”
Definition:
The linguistic variable defined by the following quintuple
Linguistic variable = (x, T(x), U,G,M)
Where x: name of variable
T(x) : set of linguistic terms which can be a value of the variable
U : Set of universe of discourse which defines the characteristics of the
variable
G : syntactic grammar which produces terms in T(x)
M: Semantic rules which map terms in T(x) to fuzzy set in U
Linguistic Variable
Example:
Let us consider a linguistic variable “X” whose name is “Age”
X = (Age, T(Age), U,G,M)
Where Age : name of variable X
T(Age) : {young, very young, very very young,not very young…,}
U : [ 0, 100]
G(Age) : 𝑇 𝑖+1 = {𝑦𝑜𝑢𝑛𝑔} ∪ 𝑣𝑒𝑟𝑦 𝑇 𝑖
M(young): (𝑢, 𝜇𝑦𝑜𝑢𝑛𝑔 (𝑢)|𝑢 ∈ [0,100]
1 𝑖𝑓 𝑢 ∈ [0,25]
Where, 𝜇𝑦𝑜𝑢𝑛𝑔 𝑢 = ቐ 𝑢−25 −2
1 + 𝑖𝑓 𝑢 ∈ [25,100]
5
Parts of Fuzzy Linguistic Terms
1. Fuzzy Predicate (Primary Term) : Expensive, old, rare, dangerous, good etc.
2. Fuzzy Modifier Very, likely, almost impossible, extremely unlikely etc.
a) Fuzzy Truth qualifier : quite true, very true, more or less, mostly false etc.
b) Fuzzy quantifier : many, few, almost, all, usually etc.
Example : “ x is a man” → man(x)
“y is P” → P(y)
“Man” and “P” is crisp set
Fuzzy predicate : Its definition contains ambiguity
“ Z is expensive” “W is young”
(expensive and young are fuzzy terms)
Let us consider “x is P” is a fuzzy predicate
𝑷 𝒙 𝒊𝒔 𝒂 𝒇𝒖𝒛𝒛𝒚 𝒔𝒆𝒕 𝒂𝒏𝒅 𝝁𝑷(𝒙) 𝒊𝒔 𝒎𝒆𝒎𝒃𝒆𝒓𝒔𝒉𝒊𝒑 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏
Fuzzy Modifier : young with a membership function 𝝁𝒚𝒐𝒖𝒏𝒈 . If we use very young,
𝝁𝒗𝒆𝒓𝒚 𝒚𝒐𝒖𝒏𝒈 = 𝝁𝒚𝒐𝒖𝒏𝒈 𝟐
Example:
T = { true, very true, fairly, absolutely,…, absolutely false, fairly
false, false}
𝝁𝒕𝒓𝒖𝒆 𝜸 = 𝜸
𝝁𝒗𝒆𝒓𝒚 𝒕𝒓𝒖𝒆 𝜸 = (𝝁𝒕𝒓𝒖𝒆 𝜸 )𝟐
𝝁𝒇𝒂𝒊𝒓𝒍𝒚 𝒕𝒓𝒖𝒆 𝜸 = (𝝁𝒕𝒓𝒖𝒆 𝜸 )𝟏/𝟐

𝝁𝒇𝒂𝒍𝒔𝒆 𝜸 = 𝟏 − 𝝁𝒕𝒓𝒖𝒆 𝜸 = 𝟏 − 𝜸
𝝁𝒗𝒆𝒓𝒚 𝒇𝒂𝒍𝒔𝒆 𝜸 = (𝝁𝒇𝒂𝒍𝒔𝒆 𝜸 )𝟐
𝝁𝒇𝒂𝒊𝒓𝒍𝒚 𝒇𝒂𝒍𝒔𝒆 𝜸 = (𝝁𝒇𝒂𝒍𝒔𝒆 𝜸 )𝟏/𝟐

𝟏 𝒊𝒇 𝜸 = 𝟏
𝝁𝒂𝒃𝒔𝒐𝒍𝒖𝒕𝒆𝒍𝒚 𝒕𝒓𝒖𝒆 𝜸 = ቊ
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
𝟏 𝒊𝒇 𝜸 = 𝟎
𝝁𝒂𝒃𝒔𝒐𝒍𝒖𝒕𝒆𝒍𝒚 𝒇𝒂𝒍𝒔𝒆 𝜸 =ቊ
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
Example (J.S.R Jhang) :
T(Age) = { young, not young, very young, not very young,
middle aged, not middle aged,…,
old, not old, very old, more or less old, not very old,…,
not very young and not very old }
Definition : Concentration and dilation of linguistic values
Let A be a linguistic value characterized by a fuzzy set with membership
function 𝝁𝑨 . . Then 𝐴𝑘 is interpreted as a modified version of the
original linguistic value expressed as

𝑨𝒌 = න 𝝁𝑨 𝒙 𝒌 Τ𝒙

𝑿
Concentration and dilation (J.S.R Jhang) :
Definition : Concentration and dilation of linguistic values
Let A be a linguistic value characterized by a fuzzy set with membership
function 𝝁𝑨 . . Then 𝐴𝑘 is interpreted as a modified version of the
original linguistic value expressed as

𝑨𝒌 = න 𝝁𝑨 𝒙 𝒌Τ
𝒙
𝑿
Concentration is Expressed as
𝑪𝑶𝑵(𝑨) = 𝑨 𝟐 = 𝝁𝑨 𝒙 𝟐 - very
Dilation is Expressed as
𝑫𝑰𝑳(𝑨) = 𝑨 𝟎.𝟓 = 𝝁𝑨 𝒙 𝟏/𝟐
- more or less
Examples (J.S.R Jhang) :

• More or less old = 𝐃𝐈𝐋 𝒐𝒍𝒅 = 𝒐𝒍𝒅 𝟎.𝟓


• Not young and not old = ¬ young ∩ ¬ old
• Young but not young = young ∩ ¬ young 𝟐
• Extremely old = 𝑪𝑶𝑵 𝑪𝑶𝑵 𝑪𝑶𝑵 𝑨 = (((𝒐𝒍𝒅)𝟐 )𝟐 )𝟐
Fuzzy IF THEN Rules
IF x is A Then y is B
R = A→ 𝑩 = 𝑨 × 𝑩 = ‫∗ 𝒙 𝑨𝝁 𝒀×𝑿׬‬෤ 𝝁𝑩 𝒚 Τ(𝒙, 𝒚)
Examples:
• IF temp is High then pressure is low
• IF pressure is high, then volume is small
• If the road is slippery, then driving is dangerous
• If a tomato s red, then it is ripe
• If speed is high, then apply the brake a little

Denoted by 𝑨 → 𝑩
Fuzzy IF THEN Rules
IF x is A Then y is B
Rules: R = A→ 𝑩 = 𝑨 𝒄𝒐𝒖𝒑𝒍𝒆𝒅 𝒘𝒊𝒕𝒉 𝑩
1. R = A → 𝑩 = 𝑨 × 𝑩 = ‫ 𝒚 𝑩𝝁˄ 𝒙 𝑨𝝁 𝒀×𝑿׬‬Τ 𝒙, 𝒚 𝑴𝒂𝒎𝒅𝒂𝒏𝒊
2. R = A → 𝑩 = 𝑨 × 𝑩 = ‫ 𝒚 𝑩𝝁 𝒙 𝑨𝝁 𝒀×𝑿׬‬Τ(𝒙, 𝒚) Larsen
(Algebraic Product)
R = 𝑨 𝒆𝒏𝒕𝒂𝒊𝒍𝒔 𝑩
Rules:
1. 𝑹𝒂 = ¬𝑨 ∪ 𝑩 =
‫ 𝟏(˄𝟏 𝒀×𝑿׬‬− 𝝁𝑨 𝒙 + 𝝁𝑩 𝒚 )Τ 𝒙, 𝒚 𝒁𝒂𝒅𝒆𝒉 𝑨𝒓𝒊𝒕𝒉𝒎𝒆𝒕𝒊𝒄
2. 𝑹𝒎𝒎 = ¬𝑨 ∪ (𝑨 ∪ 𝑩) =
‫ 𝟏( 𝒀×𝑿׬‬− 𝝁𝑨 𝒙 )˅(𝝁𝑨 𝒙 ˄𝝁𝑩 𝒚 )Τ 𝒙, 𝒚 𝒁𝒂𝒅𝒆𝒉 𝑴𝒊𝒏𝒎𝒂𝒙 𝒓𝒖𝒍𝒆
Fuzzy Reasoning
Fuzzy Reasoning ( Approximate Reasoning) is an inference
procedure that derives conclusions from a set of fuzzy IF THEN
rules and Known Facts.
Modus Ponens Modus Tollens

Premise 1 (Fact ) : x is a Premise 1 (Fact ) : y is b


Premise 2 (Rule ) : If x is a then y is b Premise 2 (Rule ) : If x is a then y is b
Consequences (Conclusion) : y is b Consequences (Conclusion) : x is a
Forward Inference Backward Inference
Fuzzy Reasoning
Generalized Modus Ponens (Approximate Reasoning)

Premise 1 (Fact ) : x is 𝐀′ R(x)


Premise 2 (Rule ) : If x is 𝐀 then y is B R(x,y)
Consequences (Conclusion) : y is 𝐁′ R(y)
R 𝒚 = R 𝒙 ∘ R 𝒙, 𝒚
𝐁′ = 𝐀′ ∘ (𝑨 → 𝑩)
Example:
Premise 1 (Fact ) : If tomato is more or less red R(x)
Premise 2 (Rule ) : If tomato is red then it is ripe R(x,y)
Consequences (Conclusion) : it is more or less ripe R(y)
R 𝒚 = R 𝒙 ∘ R 𝒙, 𝒚
Fuzzy Reasoning
Single Rule with Multiple Antecedents

Premise 1 (Fact ) : 𝑥 𝑖𝑠 𝐀′ 𝑎𝑛𝑑 𝑦 𝑖𝑠 𝐁′ 𝐀′ × 𝐁′


Premise 2 (Rule ) : If 𝑥 𝑖𝑠 𝑨 𝑎𝑛𝑑 𝑦 𝑖𝑠 𝑩 then 𝑍 𝑖𝑠 𝑪 𝑨×𝑩→𝑪
Conclusion : Z is 𝐂′ 𝐂′ = 𝐀′ × 𝐁′ · 𝑨 × 𝑩 → 𝑪

Example:
Premise 1 (Fact ) : If tomato is more or less red
Premise 2 (Rule ) : If tomato is red then it is ripe
Conclusion : it is more or less ripe
𝐂 ′ = 𝐀′ × 𝐁′ ∘ 𝑨 × 𝑩 → 𝑪
Fuzzy Reasoning
Multiple Rule with Multiple Antecedents

Premise 1 (Fact ) : 𝑥 𝑖𝑠 𝐀′ 𝑎𝑛𝑑 𝑦 𝑖𝑠 𝐁′ 𝐀′ × 𝐁′


Premise 2 (Rule 1) : If 𝑥 𝑖𝑠 𝑨𝟏 𝑎𝑛𝑑 𝑦 𝑖𝑠 𝑩𝟏 then 𝑍 𝑖𝑠 𝑪𝟏 𝑹𝟏 = 𝑨𝟏 × 𝑩𝟏 → 𝑪𝟏
Premise 2 (Rule 1) : If 𝑥 𝑖𝑠 𝑨𝟐 𝑎𝑛𝑑 𝑦 𝑖𝑠 𝑩𝟐 then 𝑍 𝑖𝑠 𝑪𝟐 𝑹𝟐 = 𝑨𝟐 × 𝑩𝟐 → 𝑪𝟐
Conclusion : Z is 𝐂 ′ 𝐂 ′ = 𝐀′ × 𝐁′ ∘ ( 𝑹𝟏 ∪ 𝑹𝟐 )

𝐂 ′ = 𝐀′ × 𝐁 ′ ∘ ( 𝑹𝟏 ∪ 𝑹𝟐 )

You might also like