0% found this document useful (0 votes)
68 views91 pages

Sca L1

The document discusses soft computing techniques including fuzzy logic. It introduces key concepts such as fuzzy sets and membership functions. It describes operations on fuzzy sets and properties of fuzzy sets. It also discusses linguistic variables and linguistic hedges/modifiers.

Uploaded by

S K Prajapat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views91 pages

Sca L1

The document discusses soft computing techniques including fuzzy logic. It introduces key concepts such as fuzzy sets and membership functions. It describes operations on fuzzy sets and properties of fuzzy sets. It also discusses linguistic variables and linguistic hedges/modifiers.

Uploaded by

S K Prajapat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 91

PROBLEM SOLVING TECHNIQUES

HARD COMPUTING SOFT COMPUTING

Precise Models Approximate Models

Traditional Functional
Symbolic Numerical Approximate Approximation
Logic Modeling and Reasoning and Randomized
Reasoning Search Search
In 1994, Prof Zadeh introduced the term “Soft Computing“

According to him
"...in contrast to traditional hard computing, soft computing exploits
the tolerance for
-imprecision,
-uncertainty,
-and partial truth
to achieve tractability, robustness, low solution-cost, and better
rapport with reality”
Introduction to Fuzzy Logic
A question?
• Are you tired?
• Rate on the scale
– 0 (no)
– 1 (Yes)

• Its Boolean : either true or false


• Rate on the scale
–0
– 0.1
– 0.2
– 0.3
– 0.4
– 0.5

Real world isn’t actually that precise…


• Rate on the scale
– Very_tired
– Medium_tired
– Somewhat_tired
– Not_tired

• Closer to human being


• Conclusion: Reality is fuzzy
Eliminate the Vague?
• It might be argued that vagueness is an obstacle to
clarity of meaning.
• But there does seem to be a loss of expressiveness
when statements like “ Its very hot” are eliminated
from the statements
• This is what happens when natural language is
translated into classic logic. The loss is not severe for
accounting programs or computational mathematics
programs, but will appear when the programming task
turns to issues of will appear when the programming
task turns to issues of queries and knowledge.
WHAT IS FUZZY LOGIC?
 Definition of fuzzy

 Fuzzy – “not clear; vague; uncertain; imprecise; blurred”

 Definition of fuzzy logic

 A form of knowledge representation suitable for notions that


cannot be defined precisely, but which depend upon their
contexts.

 The term fuzzy logic refers to a logic of approximation.

 Boolean logic assumes that every fact is either entirely true or


false.

 Fuzzy logic allows for varying degrees of truth.


Fuzzy Vs Boolean Logic
Boolean logic has clear boundaries and have only two
values
0 and 1
Fuzzy Logic mimics the human thinking and can be
represented by degree of membership
Crisp set vs. fuzzy set
– The crisp set is defined in such a way as to partition the individuals in some given
universe of discourse into two groups: members and nonmembers.
• However, many classification concepts do not exhibit this characteristic.
• For example, the set of tall people, expensive cars, or sunny days.
For example: the weather today
Sunny: If we define any cloud cover of 25% or less is sunny.
This means that a cloud cover of 26% is not sunny?
“Vagueness” should be introduced.

– A fuzzy set can be defined mathematically by assigning to each possible individual


in the universe of discourse a value representing its grade of membership in the
fuzzy set.
• For example: a fuzzy set representing our concept of sunny might assign a degree
of membership of 1 to a cloud cover of 0%, 0.8 to a cloud cover of 20%, 0.4 to a
cloud cover of 30%, and 0 to a cloud cover of 75%.

Fuzzy logic : it uses linguistic terms which humans often use to describe their
actions. E.g. John is tall.
Crisp set vs. fuzzy set ( Graphical Representation)

Someone over 190 cm is almost universally considered to be tall. Someone who is 180
cm may be considered to be sort of tall , while someone who is under 160 cm is not
usually considered to be tall.
Fuzzy sets
• A membership function:
– A characteristic function: the values assigned to the elements of the universal
set fall within a specified range and indicate the membership grade of these
elements in the set.
– To express imprecision quantitatively, a set membership function maps
elements to real values between zero and one (inclusive).
– Larger values denote higher degrees of set membership.
• A set defined by membership functions is a fuzzy set.
• The most commonly used range of values of membership functions is the unit
interval [0,1].
• The universal set X is always a crisp set.
• Notation:
– The membership function of a fuzzy set A is denoted by :  A : X → [0,1]

15
OPERATIONS ON FUZZY SETS
Operations on Fuzzy Sets: Intersection [ Graphical representation ]

30
Operations on Fuzzy Sets: Union and Complement

31
Example
⚫ A = {1.0, 0.20, 0.75}
⚫ B = {0.2, 0.45, 0.50}

⚫ A  B = {MAX(1.0, 0.2), MAX(0.20, 0.45), MAX(0.75, 0.50)}


= {1.0, 0.45, 0.75}

A  B = {MIN(1.0, 0.2), MIN(0.20, 0.45), MIN(0.75, 0.50)} = {0.2, 0.20,


0.50}

Ac = {1 – 1.0, 1 – 0.2, 1 – 0.75} = {0.0, 0.8, 0.25}


PROPERTIES OF FUZZY SETS
PROPERTIES OF FUZZY SETS
PROPERTIES OF FUZZY SETS
PROPERTIES OF FUZZY SETS

•All the similar to fuzzy Sets.


•Except for the law of excluded middle and
law of contradiction
For fuzzy set A
AA’ ≠ U
A ∩ A’ ≠ ø
The set B of numbers approaching 2 can be represented by the
membership function
FEATURES OF MEMBERSHIP FUNCTIONS
core(A) is set of all points x in X such that {(x∣ µA(x) =1 }

Support(A) is set of all points x in X such that {(x∣ µA(x) > 0 }

Boundary (A) is set of all points x in X such that {(x∣ 0≺µA(x) ≺ 1 }

Core of a fuzzy set may be an empty set.

Fuzzy set whose support is a single point in X with µA(x) =1 is called fuzzy
singleton
➢ CORE:

➢ SUPPORT:

➢ BOUNDARY:
FEATURES OF MEMBERSHIP FUNCTIONS

• Crossover point of a fuzzy set A is a point x in


X such that {(x∣ µA(x) = 0.5 }
• There can be more than one crossover point
in a fuzzy set.
• Height of fuzzy set : maximum value of the
membership function.
• For a normal fuzzy set, height =1
• For a subnormal fuzzy set, height < 1
Normal and subnormal fuzzy set
• Normal fuzzy set : whose membership function has at least one
element in the universe whose membership value is unity.
• Prototypical element : the element for which the membership is
equal to 1.
• Subnormal fuzzy set: whose membership function has no
element in the universe whose membership value is unity.
Convex and non convex fuzzy set
• Convex fuzzy set has a membership function whose membership
values are strictly monotonically increasing or strictly monotonically
decreasing or strictly monotonically increasing than strictly
monotonically decreasing with increasing values for the elements in
the universe.

Nonconvex fuzzy set: possessing the characteristics opposite to the convex fuzzy set.
Intersection of two convex fuzzy sets
Fuzzification
➢ Use crisp inputs from the user.

➢ Determine membership values for all the relevant classes (i.e., in


right Universe of Discourse).
Questions on Fuzzy Sets and
Membership Functions
Membership Functions: Intuition based
Linguistic Variable
A variable whose values are words or sentences in natural
language.

Example 1: Temperature is linguistic variable if it takes values


hot, cool, warm, comfortable etc.

Example 2: the values of the fuzzy variable height could be tall,


very tall, very very tall, somewhat tall, not very tall, tall but
not very tall, quite tall, more or less tall.
What is LINGUISTIC VARIABLE
Example of LINGUISTIC VARIABLE
Example of LINGUISTIC VARIABLE

➢ Let x be a linguistic variable with the label “speed”.


➢ Terms of x, which are fuzzy sets, could be “positive low”, “negative
high” from the term set T:

T = {PostiveHigh, PositiveLow, NegativeLow,


NegativeHigh, Zero}

➢ Each term is a fuzzy variable defined on the base variable which


might be the scale of all relevant velocities.
MEMBERSHIP FUNCTIONS
Practice Question

What are the fuzzy sets representing the following?


•Not cold climate
•Not hot climate
•Extreme climate
•Pleasant climate
Practice Question
Linguistic Hedges/ Modifiers
➢ Let age = { young, old, and very old } be a linguistic variable.
➢ Young :
➢ 20 years old the membership function young is 0.8, for 30 years old it
is 0.6, for 40 it is 0.2, and 60 obviously is no more young, so 0.
➢ Now, the linguistic variable very young where very is the
modifier.
➢ Once I define what young is, in very young, very is the
modifier.
➢ So, we can probably define that their membership function
as very young to be young square.
Linguistic Hedges/ Modifiers
➢ A linguistic variable can be
➢ atomic terms ( slow, medium, young, beautiful) or
➢ composite term( very slow ,fairly beautiful , very red and not
small etc)
➢ Atomic terms are modified/hedged with
adjectives(nouns), adverbs(verb) such as very slow ,
more or less beautiful, slightly, fairly ,somewhat
,extremely etc.
➢ These modifiers are called as Linguistic Hedges
Linguistic Hedges
• Concentrations tend to concentrate the elements of a fuzzy set by
reducing the degree of membership of all elements that are only ‘‘partly’’
in the set.


• Dilations (or dilution) stretches or dilates a fuzzy set by increasing the membership
of elements that are ‘‘partly’’ in the set.

• Intensification increases the degree of membership of those elements in the


set with original membership values greater than 0.5, and it decreases the
degree of membership of those elements in the set with original membership
values less than 0.5. It can be expressed by numerous algorithms, one of which,
proposed by Zadeh , is
Geometric Interpretation of Linguistic
Hedges
LINGUISTIC HEDGES (LINGUISTIC QUANTIFIERS)
➢ Hedges modify the shape of a fuzzy set.
Example
• Construct a linguistic variable ‘‘intensely
small’’
Inference
• Use knowledge to perform deductive
reasoning

• To deduce or infer a conclusion, given a


body of facts and knowledge

80
Inference : Example
• In the identification of a triangle
– Let A, B, C be the inner angles of a triangle
• Where A ≥ B ≥ C ≥ 0
– Let U be the universe of triangles, i.e.,
• U = {(A,B,C) | A ≥ B ≥ C ≥ 0; A+B+C = 180°}
– Let’s define a number of geometric shapes
• I Approximate isosceles triangle
• R Approximate right triangle
• IR Approximate isosceles and right triangle
• E Approximate equilateral triangle
• T Other triangles
81
Inference : Example
• We can infer membership values for all of these
triangle types through the method of inference

• Because, we possess knowledge about geometry that


helps us to make the membership assignments

• For Isosceles,
– µi (A,B,C) = 1- (1/60)* min(A-B, B-C)

– If A=B OR B=C THEN µi (A,B,C) = 1;

– If A=120°,B=60°, and C =0° THEN µi (A,B,C) = 0.


82
Inference : Example
• For right triangle,
– µR (A,B,C) = 1- (1/90)* |A-90°|

– If A=90° THEN µR (A,B,C) = 1;

– If A=180° THEN µR (A,B,C) = 0.

• For isosceles and right triangle


– IR = I ∩R =min (I, R)

– µIR (A,B,C) = min[µI (A,B,C), µR (A,B,C)]

83
Inference : Example
• For equilateral triangle
– µE (A,B,C) = 1 - 1/180° * (A-C)
– When A = B = C then µE (A,B,C) = 1,
– A = 180° then µE (A,B,C) = 0

• For all other triangles

= min {1 - µI (A,B,C) , 1 - µR (A,B,C) , 1 - µE (A,B,C) }

84
Inference : Question
• Find the membership values for the fuzzy triangle
as isosceles , right, equilateral and other triangle

85
Note : Neural Networks and Genetic
later on.
Fuzzy Set Theory so far
• Fuzzy Set
• Membership Functions
• Fuzzy Relations and compositions
Fuzzy Relations (R)
How to compute Fuzzy Relation
Operations on Fuzzy Relation

Note:
1. Let X, Y, Z are assumed to be universe of discourse for fuzzy sets for relation R & S..
2.Union and Intersection operations are defined over same set of elements of Relation R and
S.
Application of Fuzzy Relation

You might also like