Introduction: Fuzzy Logic
Adri Jovin J J, M.Tech., Ph.D.
UITE221- SOFT COMPUTING
Soft Computing
• Introduced by Lotfi A. Zadeh, University of California, Berkley
• Collection of computational methods
• Includes Fuzzy Systems, Neural Networks and Evolutionary Algorithms
• Deployment of soft computing for the solution of machine learning problems has led to high Machine Intelligence
Quotient
UITE221 SOFT COMPUTING 2
Image Credit: Electrical Engineering and Computer Sciences, UC, Berkeley
“Soft computing differs from hard computing (conventional computing) in its tolerance to
imprecision, uncertainty and partial truth”
-Lotfi A. Zadeh
Soft Computing (Contd…)
Fuzzy Systems
Neural
Networks
Evolutionary
Algorithms
UITE221 SOFT COMPUTING 3
Fuzzy-evolutionary hybrids Neuro-fuzzy hybrids
Neuro-evolutionary hybrids
Neuro-fuzzy-evolutionary hybrids
Fuzzy Logic
“As the complexity of a system increases, it becomes more difficult and
eventually impossible to make a precise statement about its behavior, eventually arriving
at a point of complexity where the fuzzy logic method born in humans is the only way to
get at the problem.”
-Lotfi A. Zadeh
UITE221 SOFT COMPUTING 4
Image Credit: Electrical Engineering and Computer Sciences, UC, Berkeley
Fuzzy Logic (Contd.)
Introduced in they year 1965
Japanese have utilized the full potential of fuzzy sets by commercializing the technology
Fuzziness means “vagueness”
Mathematical tool to handle uncertainty arising due to vagueness
Understanding human speech, handwriting recognition
UITE221 SOFT COMPUTING 5
Fuzzy Logic (Contd…)
UITE221 SOFT COMPUTING 6
Fuzz Logic System
Imprecise and
vague data Decisions
0.5
1.0 Tall
150 180 210
Membership
Height (cm)
0.5
1.0 Tall
150 180 210
Membership
Height (cm)
Short Medium
Fuzzy Logic (Contd…)
• Describe tall or short or medium height…
• “short” and “tall” are linguistic variables
• Set membership helps appropriately to distinguish linguistic variables
• Various degree of membership on a real continuous interval [0,1]
• Fuzzy sets accommodate the degrees of membership
UITE221 SOFT COMPUTING 7
This Photo by Unknown Author is
licensed under CC BY-SA-NC
Fuzzy Logic (Contd…)
• A fuzzy set 𝐴 contains an object 𝑥 to degree 𝑎(𝑥)
• 𝑎 𝑥 = 𝐷𝑒𝑔𝑟𝑒𝑒(𝑥 ∈ 𝐴) and the map 𝑎: 𝑋 → {𝑀𝑒𝑚𝑏𝑒𝑟𝑠ℎ𝑖𝑝 𝐷𝑒𝑔𝑟𝑒𝑒𝑠} is called a set function or a membership function
• Fuzzy set 𝐴 can be expressed as A = 𝑥, 𝑎 𝑥 , 𝑥 ∈ 𝑋 which defines the possibility distribution
• Fuzzy sets form the building blocks for fuzzy IF-THEN rules which is of general form “IF X is A THEN Y is B”
• Fuzzy systems refer to the systems governed by fuzzy IF-THEN rules
• IF part of the implication is called antecedent and THEN part is called precedent
• Possess partial matching capability
UITE221 SOFT COMPUTING 8
Fuzzy Logic (Contd…)
• Rule based system constructed from the collection of linguistic rules on one hand
• Non-linear mappings of inputs (stimuli) to outputs (response) on the other hand
• Inputs and outputs can be numbers or vectors of numbers
• Rule-based systems can be any system with arbitrary accuracy, i.e., they work as universal approximators
• Smart rules give smart system
• Number of rules increases exponentially with the dimension of the input space
• Rule explosion is called the curse of dimensionality
UITE221 SOFT COMPUTING 9
Classical sets (Crisp sets)
• Set is a collection of objects sharing certain characteristics
• No partial membership exist in crisp sets
• Crisp set is defines by its characteristic function
UITE221 SOFT COMPUTING 10
Universe of discourse
• Also known as universal set (U)
• Contains all possible elements having the same characteristics, from which sets can be formed
• Crisp set A in universe U
• An object 𝑥 is a member of given set 𝐴 (𝑥 ∈ 𝐴) ; 𝑥 belongs to 𝐴
• An object x is not a member of given set A (𝑥 ∉ 𝐴); x does not belong to A
UITE221 SOFT COMPUTING 11
U
A
Defining a set
• List of all the members of a set may be given
𝐴 = 2,4,6,8,10
• The properties of the set of elements may be specified
𝐴 = {𝑥|𝑥𝑖𝑠 𝑒𝑣𝑒𝑛 𝑛𝑢𝑚𝑏𝑒𝑟 ≤ 10}
• The formula for the definition of a set may be mentioned
𝐴 = 𝑥𝑖 =
𝑥𝑖 + 1
5
, 𝑖 = 1 𝑡𝑜 10, 𝑤ℎ𝑒𝑟𝑒 𝑥𝑖 = 1
UITE221 SOFT COMPUTING 12
Defining a set (Contd…)
• Basis of the results of a logical operation
𝐴 = 𝑥|𝑥 𝑖𝑠 𝑎𝑛 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑏𝑒𝑙𝑜𝑛𝑔𝑖𝑛𝑔 𝑡𝑜 𝑃 𝐴𝑁𝐷 𝑄
• There exist a membership function, usually denoted by 𝜇
𝜇𝐴 𝑥 =
1 𝑖𝑓 𝑥𝜖 𝐴
0 𝑖𝑓 𝑥 ∉ 𝐴
• Empty set or null set is usually denoted by 𝜙, which indicates the occurrence of an impossible event
• Set containing the possible subsets of a given set A is called a power set
𝑃 𝐴 = {𝑥|𝑥 ⊆ 𝐴}
UITE221 SOFT COMPUTING 13
Operations on Classical Sets: Union
𝐴 ∪ 𝐵 = {𝑥|𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐵}
UITE221 SOFT COMPUTING 14
A B
Operations on Classical Sets: Intersection
𝐴 ∪ 𝐵 = {𝑥|𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵}
UITE221 SOFT COMPUTING 15
A B
Operations on Classical Sets: Complement
𝐴 = {𝑥|𝑥 ∉ 𝐴 , 𝑥 ∈ 𝑈}
UITE221 SOFT COMPUTING 16
A
Operations on Classical Sets: Difference
UITE221 SOFT COMPUTING 17
A B
Properties of Classical Sets
Commutativity
𝐴 ∪ 𝐵 = 𝐵 ∪ 𝐴; A ∩ 𝐵 = 𝐵 ∩ 𝐴
Associativity
𝐴 ∪ 𝐵 ∪ 𝐶 = 𝐴 ∪ 𝐵 ∪ 𝐶; 𝐴 ∩ 𝐵 ∩ 𝐶 = (𝐴 ∩ 𝐵) ∩ 𝐶
Distributivity
𝐴 ∪ 𝐵 ∩ 𝐶 = 𝐴 ∪ 𝐵 ∩ 𝐴 ∪ 𝐶
𝐴 ∩ 𝐵 ∪ 𝐶 = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶)
UITE221 SOFT COMPUTING 18
Properties of Classical Sets (Contd…)
Idempotency
𝐴 ∪ 𝐴 = 𝐴; 𝐴 ∩ 𝐴 = 𝐴
Transitivity
𝐼𝑓 𝐴 ⊆ 𝐵 ⊆ 𝐶, 𝑡ℎ𝑒𝑛 𝐴 ⊆ 𝐶
Identity
𝐴 ∪ 𝜙 = 𝐴; 𝐴 ∩ 𝜙 = 𝐴
𝐴 ∪ 𝑋 = 𝑋; 𝐴 ∩ 𝑋 = 𝑋
UITE221 SOFT COMPUTING 19
Properties of Classical Sets (Contd…)
Involution
𝐴 = 𝐴
Law of excluded middle
𝐴 ∪ 𝐴 = 𝑋
Law of contradiction
𝐴 ∩ 𝐴 = 𝜙
DeMorgan’s Law
|𝐴 ∩ 𝐵| = 𝐴 ∪ 𝐵; 𝐴 ∪ 𝐵 = 𝐴 ∩ 𝐵
UITE221 SOFT COMPUTING 20
Fuzzy Set Operations: Union
The union of fuzzy sets Type equation here.
UITE221 SOFT COMPUTING 21
References
Rajasekaran, S., & Pai, G. V. (2017). Neural Networks, Fuzzy Systems and Evolutionary Algorithms: Synthesis and
Applications. PHI Learning Pvt. Ltd..
Haykin, S. (2010). Neural Networks and Learning Machines, 3/E. Pearson Education India.
Sivanandam, S. N., & Deepa, S. N. (2007). Principles of soft computing. John Wiley & Sons.
UITE221 SOFT COMPUTING 22

Introduction to Fuzzy logic

  • 1.
    Introduction: Fuzzy Logic AdriJovin J J, M.Tech., Ph.D. UITE221- SOFT COMPUTING
  • 2.
    Soft Computing • Introducedby Lotfi A. Zadeh, University of California, Berkley • Collection of computational methods • Includes Fuzzy Systems, Neural Networks and Evolutionary Algorithms • Deployment of soft computing for the solution of machine learning problems has led to high Machine Intelligence Quotient UITE221 SOFT COMPUTING 2 Image Credit: Electrical Engineering and Computer Sciences, UC, Berkeley “Soft computing differs from hard computing (conventional computing) in its tolerance to imprecision, uncertainty and partial truth” -Lotfi A. Zadeh
  • 3.
    Soft Computing (Contd…) FuzzySystems Neural Networks Evolutionary Algorithms UITE221 SOFT COMPUTING 3 Fuzzy-evolutionary hybrids Neuro-fuzzy hybrids Neuro-evolutionary hybrids Neuro-fuzzy-evolutionary hybrids
  • 4.
    Fuzzy Logic “As thecomplexity of a system increases, it becomes more difficult and eventually impossible to make a precise statement about its behavior, eventually arriving at a point of complexity where the fuzzy logic method born in humans is the only way to get at the problem.” -Lotfi A. Zadeh UITE221 SOFT COMPUTING 4 Image Credit: Electrical Engineering and Computer Sciences, UC, Berkeley
  • 5.
    Fuzzy Logic (Contd.) Introducedin they year 1965 Japanese have utilized the full potential of fuzzy sets by commercializing the technology Fuzziness means “vagueness” Mathematical tool to handle uncertainty arising due to vagueness Understanding human speech, handwriting recognition UITE221 SOFT COMPUTING 5
  • 6.
    Fuzzy Logic (Contd…) UITE221SOFT COMPUTING 6 Fuzz Logic System Imprecise and vague data Decisions 0.5 1.0 Tall 150 180 210 Membership Height (cm) 0.5 1.0 Tall 150 180 210 Membership Height (cm) Short Medium
  • 7.
    Fuzzy Logic (Contd…) •Describe tall or short or medium height… • “short” and “tall” are linguistic variables • Set membership helps appropriately to distinguish linguistic variables • Various degree of membership on a real continuous interval [0,1] • Fuzzy sets accommodate the degrees of membership UITE221 SOFT COMPUTING 7 This Photo by Unknown Author is licensed under CC BY-SA-NC
  • 8.
    Fuzzy Logic (Contd…) •A fuzzy set 𝐴 contains an object 𝑥 to degree 𝑎(𝑥) • 𝑎 𝑥 = 𝐷𝑒𝑔𝑟𝑒𝑒(𝑥 ∈ 𝐴) and the map 𝑎: 𝑋 → {𝑀𝑒𝑚𝑏𝑒𝑟𝑠ℎ𝑖𝑝 𝐷𝑒𝑔𝑟𝑒𝑒𝑠} is called a set function or a membership function • Fuzzy set 𝐴 can be expressed as A = 𝑥, 𝑎 𝑥 , 𝑥 ∈ 𝑋 which defines the possibility distribution • Fuzzy sets form the building blocks for fuzzy IF-THEN rules which is of general form “IF X is A THEN Y is B” • Fuzzy systems refer to the systems governed by fuzzy IF-THEN rules • IF part of the implication is called antecedent and THEN part is called precedent • Possess partial matching capability UITE221 SOFT COMPUTING 8
  • 9.
    Fuzzy Logic (Contd…) •Rule based system constructed from the collection of linguistic rules on one hand • Non-linear mappings of inputs (stimuli) to outputs (response) on the other hand • Inputs and outputs can be numbers or vectors of numbers • Rule-based systems can be any system with arbitrary accuracy, i.e., they work as universal approximators • Smart rules give smart system • Number of rules increases exponentially with the dimension of the input space • Rule explosion is called the curse of dimensionality UITE221 SOFT COMPUTING 9
  • 10.
    Classical sets (Crispsets) • Set is a collection of objects sharing certain characteristics • No partial membership exist in crisp sets • Crisp set is defines by its characteristic function UITE221 SOFT COMPUTING 10
  • 11.
    Universe of discourse •Also known as universal set (U) • Contains all possible elements having the same characteristics, from which sets can be formed • Crisp set A in universe U • An object 𝑥 is a member of given set 𝐴 (𝑥 ∈ 𝐴) ; 𝑥 belongs to 𝐴 • An object x is not a member of given set A (𝑥 ∉ 𝐴); x does not belong to A UITE221 SOFT COMPUTING 11 U A
  • 12.
    Defining a set •List of all the members of a set may be given 𝐴 = 2,4,6,8,10 • The properties of the set of elements may be specified 𝐴 = {𝑥|𝑥𝑖𝑠 𝑒𝑣𝑒𝑛 𝑛𝑢𝑚𝑏𝑒𝑟 ≤ 10} • The formula for the definition of a set may be mentioned 𝐴 = 𝑥𝑖 = 𝑥𝑖 + 1 5 , 𝑖 = 1 𝑡𝑜 10, 𝑤ℎ𝑒𝑟𝑒 𝑥𝑖 = 1 UITE221 SOFT COMPUTING 12
  • 13.
    Defining a set(Contd…) • Basis of the results of a logical operation 𝐴 = 𝑥|𝑥 𝑖𝑠 𝑎𝑛 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑏𝑒𝑙𝑜𝑛𝑔𝑖𝑛𝑔 𝑡𝑜 𝑃 𝐴𝑁𝐷 𝑄 • There exist a membership function, usually denoted by 𝜇 𝜇𝐴 𝑥 = 1 𝑖𝑓 𝑥𝜖 𝐴 0 𝑖𝑓 𝑥 ∉ 𝐴 • Empty set or null set is usually denoted by 𝜙, which indicates the occurrence of an impossible event • Set containing the possible subsets of a given set A is called a power set 𝑃 𝐴 = {𝑥|𝑥 ⊆ 𝐴} UITE221 SOFT COMPUTING 13
  • 14.
    Operations on ClassicalSets: Union 𝐴 ∪ 𝐵 = {𝑥|𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐵} UITE221 SOFT COMPUTING 14 A B
  • 15.
    Operations on ClassicalSets: Intersection 𝐴 ∪ 𝐵 = {𝑥|𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵} UITE221 SOFT COMPUTING 15 A B
  • 16.
    Operations on ClassicalSets: Complement 𝐴 = {𝑥|𝑥 ∉ 𝐴 , 𝑥 ∈ 𝑈} UITE221 SOFT COMPUTING 16 A
  • 17.
    Operations on ClassicalSets: Difference UITE221 SOFT COMPUTING 17 A B
  • 18.
    Properties of ClassicalSets Commutativity 𝐴 ∪ 𝐵 = 𝐵 ∪ 𝐴; A ∩ 𝐵 = 𝐵 ∩ 𝐴 Associativity 𝐴 ∪ 𝐵 ∪ 𝐶 = 𝐴 ∪ 𝐵 ∪ 𝐶; 𝐴 ∩ 𝐵 ∩ 𝐶 = (𝐴 ∩ 𝐵) ∩ 𝐶 Distributivity 𝐴 ∪ 𝐵 ∩ 𝐶 = 𝐴 ∪ 𝐵 ∩ 𝐴 ∪ 𝐶 𝐴 ∩ 𝐵 ∪ 𝐶 = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) UITE221 SOFT COMPUTING 18
  • 19.
    Properties of ClassicalSets (Contd…) Idempotency 𝐴 ∪ 𝐴 = 𝐴; 𝐴 ∩ 𝐴 = 𝐴 Transitivity 𝐼𝑓 𝐴 ⊆ 𝐵 ⊆ 𝐶, 𝑡ℎ𝑒𝑛 𝐴 ⊆ 𝐶 Identity 𝐴 ∪ 𝜙 = 𝐴; 𝐴 ∩ 𝜙 = 𝐴 𝐴 ∪ 𝑋 = 𝑋; 𝐴 ∩ 𝑋 = 𝑋 UITE221 SOFT COMPUTING 19
  • 20.
    Properties of ClassicalSets (Contd…) Involution 𝐴 = 𝐴 Law of excluded middle 𝐴 ∪ 𝐴 = 𝑋 Law of contradiction 𝐴 ∩ 𝐴 = 𝜙 DeMorgan’s Law |𝐴 ∩ 𝐵| = 𝐴 ∪ 𝐵; 𝐴 ∪ 𝐵 = 𝐴 ∩ 𝐵 UITE221 SOFT COMPUTING 20
  • 21.
    Fuzzy Set Operations:Union The union of fuzzy sets Type equation here. UITE221 SOFT COMPUTING 21
  • 22.
    References Rajasekaran, S., &Pai, G. V. (2017). Neural Networks, Fuzzy Systems and Evolutionary Algorithms: Synthesis and Applications. PHI Learning Pvt. Ltd.. Haykin, S. (2010). Neural Networks and Learning Machines, 3/E. Pearson Education India. Sivanandam, S. N., & Deepa, S. N. (2007). Principles of soft computing. John Wiley & Sons. UITE221 SOFT COMPUTING 22