1. Fuzzy
Logic
• This concept was introduced by Lofti
Zadeh in 1965 based on the Fuzzy Set
Theory. This concept provides the
possibilities which are not given by
computers, but similar to the range of
possibilities generated by humans.
2. Fuzzy
Logic
• The term fuzzy refers to things that are not clear or
are vague.
• In this way, we can consider the inaccuracies and
uncertainties of any situation.
• In the boolean system truth value, 1.0 represents
the absolute truth value and 0.0 represents the
absolute false value. But in the fuzzy system, there
is no logic for the absolute truth and absolute false
value.
• But in fuzzy logic, there is an intermediate value too
present which is partially true and partially false.
6. Characteristics of Fuzzy Logic
• This concept is flexible and we can easily understand and implement it.
• It is used for helping the minimization of the logics created by the human.
• It is the best method for finding the solution of those problems which are suitable for approximate or uncertain reasoning.
• It always offers two values, which denote the two possible solutions for a problem and statement.
• It allows users to build or create the functions which are non-linear of arbitrary complexity.
• In fuzzy logic, everything is a matter of degree.
• In the Fuzzy logic, any system which is logical can be easily fuzzified.
• It is based on natural language processing.
• It is also used by the quantitative analysts for improving their algorithm's execution.
• It also allows users to integrate with the programming.
• Highly suitable method for uncertain or approximate reasoning
• Fuzzy logic views inference as a process of propagating elastic constraints
• Fuzzy logic allows you to build nonlinear functions of arbitrary complexity.
• Fuzzy logic should be built with the complete guidance of experts
7. Architecture
of a Fuzzy
Logic System
• In the architecture of the Fuzzy Logic system, each component plays an important role. The
architecture consists of the different four components which are given below.
• Rule Base
• Fuzzification
• Inference Engine
• Defuzzification
8. • Following diagram shows the architecture or process
of a Fuzzy Logic system:
9. Advantages of Fuzzy Logic System
• It does not need a large memory
• Flexibility
• Simple
• This system can work with any type of inputs whether it is
imprecise, distorted or noisy input information.
• It provides a very efficient solution to complex problems in all fields
of life as it resembles human reasoning and decision-making.
• The structure of Fuzzy Logic Systems is easy and understandable
• Fuzzy logic is widely used for commercial and practical purposes
• Fuzzy logic in Data Mining helps you to deal with the uncertainty in
engineering
• Mostly robust as no precise inputs required
• It provides a most effective solution to complex issues
10. Disadvantages of Fuzzy Logic Systems
• Fuzzy logic systems is slow
• It doesn’t provide high accuracy
• Fuzzy logic need a lot of testing for verification and validation.
• Fuzzy logic is not always accurate, so The results are perceived based
on assumption, so it may not be widely accepted
• Fuzzy systems don’t have the capability of machine learning as-well-
as neural network type pattern recognition
• Setting exact, fuzzy rules and, membership functions is a difficult task
• Based on probability theory
11. • Applications of Fuzzy Logic
• Businesses
• Automative systems
• Defence
• Pattern Recognition and Classification
• Securities
• microwave oven
• modern control systems
• Finance
• Industries of chemicals
• Industries of manufacturing
• It is also used in the vacuum cleaners, and the timings of
washing machines.
• It is also used in heaters, air conditioners, and humidifiers.
• It is also used for controlling the brakes.
12. Set
• A set is defined as a collection of objects,
which share certain characteristics
• A set is a term, which is a collection of
unordered or ordered elements.
• Examples
• A set of all-natural numbers
• A set of students in a class.
• A set of all cities in a state.
• A set of upper-case letters of the
alphabet.
13. • Each individual entity in a set is
called a member or an element of
the set.
• The classical set is defined in such a
way that the universe of discourse
is splitted into two
groups members and non-
members. Hence, In case classical
sets, no partial membership exists.
• The sets with the crisp boundaries
are classical sets
• Let A is a given set. The
membership function can be use to
define a set A is given by:
14. Operations on Classical Set
• Following are the various operations which are
performed on the classical sets:
• Union Operation
• Intersection Operation
• Difference Operation
• Complement Operation
15. • 1. Union:
• It is also called a Logical OR operation.
• It can be described as:
• A ∪ B = { x | x ∈ A OR x ∈ B }.
• Example:
• Set A = {10, 11, 12, 13}, Set B = {11, 12, 13, 14, 15}, then A ∪ B = {10, 11, 12, 13, 14, 15}
16. • 2. Intersection
• This operation is denoted by (A ∩ B). A ∩ B is the set of those elements which are common in both set A
and B. It is also called a Logical OR operation.
• It can be described as:
• A ∩ B = { x | x ∈ A AND x ∈ B }.
• Example:
• Set A = {10, 11, 12, 13}, Set B = {11, 12, 14} then A ∩ B = {11, 12}
17. 3. Difference Operation
• This operation is denoted by (A - B). A-B is the set of
only those elements which exist only in set A but not in
set B.
• It can be described as:
A - B = { x | x ∈ A AND x ∉ B }.
4. Complement Operation:
• This operation is denoted by (A`). It is applied on a
single set. A` is the set of elements which do not exist in
set A.
• It can be described as:
A′ = {x|x ∉ A}.
18. • Properties of Classical Set
• There are following various properties which play an essential role for finding the solution of a fuzzy logic
problem.
• 1. Commutative Property:
• This property provides the following two states which are obtained by two finite sets A and B:
• A ∪ B = B ∪ A
A ∩ B = B ∩ A
• 2. Associative Property:
• This property also provides the following two states but these are obtained by three different finite sets A, B,
and C:
• A ∪ (B ∪ C) = (A ∪ B) ∪ C
A ∩ (B ∩ C) = (A ∩ B) ∩ C
• 3. Idempotency Property:
• This property also provides the following two states but for a single finite set A:
• A ∪ A = A
A ∩ A = A
19. • 4. Absorption Property
• This property also provides the following two states for any two finite sets A and B:
• A ∪ (A ∩ B) = A
A ∩ (A ∪ B) = A
• 5. Distributive Property:
• This property also provides the following two states for any three finite sets A, B, and C:
• A∪ (B ∩ C) = (A ∪ B)∩ (A ∪ C)
A∩ (B ∪ C) = (A∩B) ∪ (A∩C)
20. 6. Identity Property:
This property provides the following four states for any
finite set A and Universal set X:
A ∪ φ =A
A ∩ X = A
A ∩ φ = φ
A ∪ X = X
7. Transitive property
This property provides the following state for the finite
sets A, B, and C:
If A ⊆ B ⊆ C, then A ⊆ C
8. Ivolution property
This property provides following state for any finite set A:
21. • 9. De Morgan's Law
This law gives the following rules for providing the
contradiction and tautologies:
22. Fuzzy set
• Fuzzy set is a set having degrees of membership between 1
and 0. Fuzzy sets are represented with tilde character(~). For
example, Number of cars following traffic signals at a particular
time out of all cars present will have membership value between
[0,1].
• Partial membership exists when member of one fuzzy set can
also be a part of other fuzzy sets in the same universe.
• The degree of membership or truth is not same as probability,
fuzzy truth represents membership in vaguely defined sets.
• A fuzzy set A~ in the universe of discourse, U, can be defined as
a set of ordered pairs and it is given by
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35. Classical Set Theory Fuzzy Set Theory
1. This theory is a class of those sets having
sharp boundaries.
1. This theory is a class of those sets having un-
sharp boundaries.
2. This set theory is defined by exact
boundaries only 0 and 1.
2. This set theory is defined by ambiguous
boundaries.
3. In this theory, there is no uncertainty about
the boundary's location of a set.
3. In this theory, there always exists uncertainty
about the boundary's location of a set.
4. This theory is widely used in the design of
digital systems.
4. It is mainly used for fuzzy controllers.
36. Membership Functions
Definition: A graph that defines how each point in the
input space is mapped to membership value between 0
and 1. Input space is often referred to as the universe of
discourse or universal set (u), which contains all the
possible elements of concern in each particular
application.
37. • A membership function for a fuzzy set A on the universe of discourse X is defined as μA:X → [0,1].
• Here, each element of X is mapped to a value between 0 and 1. It is called membership
value or degree of membership. It quantifies the degree of membership of the element in X to the
fuzzy set A.
x axis represents the universe of discourse.
y axis represents the degrees of membership in the [0, 1] interval.
• There can be multiple membership functions applicable to fuzzify a numerical value. Simple
membership functions are used as use of complex functions does not add more precision in the
output.
50. Algorithm
• Define linguistic Variables and terms (start)
• Construct membership functions for them. (start)
• Construct knowledge base of rules (start)
• Convert crisp data into fuzzy data sets using membership functions.
(fuzzification)
• Evaluate rules in the rule base. (Inference Engine)
• Combine results from each rule. (Inference Engine)
• Convert output data into non-fuzzy values. (defuzzification)
51. Development
Step 1 − Define linguistic variables and terms
• Linguistic variables are input and output variables in the
form of simple words or sentences. For room
temperature, cold, warm, hot, etc., are linguistic terms.
• Temperature (t) = {very-cold, cold, warm, very-warm,
hot}
• Every member of this set is a linguistic term and it can
cover some portion of overall temperature values.
Step 2 − Construct membership functions for them
• The membership functions of temperature variable are
as shown −
52. Step3 − Construct knowledge base
rules
• Create a matrix of room temperature
values versus target temperature values
that an air conditioning system is
expected to provide.
RoomTemp. /Target Very_Cold Cold Warm Hot Very_Hot
Very_Cold No_Change Heat Heat Heat Heat
Cold Cool No_Change Heat Heat Heat
Warm Cool Cool No_Change Heat Heat
Hot Cool Cool Cool No_Change Heat
Very_Hot Cool Cool Cool Cool No_Change
53. • Build a set of rules into the knowledge base in the
form of IF-THEN-ELSE structures.
Sr. No. Condition Action
1
IF temperature=(Cold OR Very_Cold) AND target=Warm THEN Heat
2
IF temperature=(Hot OR Very_Hot) AND target=Warm THEN Cool
3 IF (temperature=Warm) AND (target=Warm) THEN No_Change
54. • Step 4 − Obtain fuzzy value
• Fuzzy set operations perform evaluation of rules. The operations used for OR and AND are Max and
Min respectively. Combine all results of evaluation to form a final result. This result is a fuzzy value.
• Step 5 − Perform defuzzification
• Defuzzification is then performed according to membership function for output variable.
55. Features of Membership Functions
1. Core of a Membership Function :-
• Core of a membership function for a fuzzy set A is defined as that region of universe
that is characterized by complete or full membership in the set A. Therefore core
consists of all those elements X of universe of discourse, such that
56. 2. Support of a Membership Function :-
•
Support of a membership function for a fuzzy set A is defined as that region of
universe that is characterized by non-zero membership in the fuzzy set A. So
support consists of all those elements X of universe, such that
57. 3. Boundary of a Membership Functions :-
• Boundary of a membership function for a fuzzy set A is defined as that region of universe
X, that is characterized by non-zero membership but not complete membership.
Boundaries comprises that part of elements X of Universe of Discourse whose
membership value is given by
59. 4. Cross-over Points of a Membership Function :-
• It is defined as the elements of a fuzzy set A whose membership value is equal to 0.5
5. Height of a Membership Functions :-
Height of a membership function is the maximum value of the membership function. If
the height of a fuzzy set is < 1 then it subnormal fuzzy set. Whereas if its height is
equal to 1 then it is a normal fuzzy set.
60. 6. Normal Fuzzy Set :-
A normal fuzzy set is one that consists of at-least one element ‘x’ of universe whose
membership value is unity.
For fuzzy sets where only one element which has a membership value of unity, that
particular element is called prototype of the fuzzy set or prototypical element.
A subnormal fuzzy set has no element with membership=1.
7. Convex Fuzzy Set :-
Convex fuzzy set is described by a membership function whose membership values
are strictly Monotonically Increasing or Monotonically Decreasing or Initially
Monotonically Increasing then Monotonically Decreasing with the increase in the
values of the elements of that particular fuzzy set.
61.
62. 8. Fuzzy Number :-
If ‘A’ is a convex single point normal fuzzy set defined on real line, then ‘A’ is
called Fuzzy Number.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84. Fuzzy Reasoning
Introduction
Fuzzy reasoning, also known as
approximate reasoning, is a inference
procedure that derives conclusions from a
set of fuzzy if-then rules and known facts.
Before introducing fuzzy reasoning, we
shall discuss the compositional rule of
inference, which plays a key role in fuzzy
reasoning.
107. Difference between Fuzzification and Defuzzification
S.No. Comparison Fuzzification Defuzzification
1. Basic
Precise data is converted into imprecise
data.
Imprecise data is converted into precise
data.
2. Definition
Fuzzification is the method of converting a
crisp quantity into a fuzzy quantity.
Defuzzification is the inverse process of
fuzzification where the mapping is done to
convert the fuzzy results into crisp results.
3. Example Like, Voltmeter Like, Stepper motor and D/A converter
4. Methods
Intuition, inference, rank ordering, angular
fuzzy sets, neural network, etcetera.
Maximum membership principle, centroid
method, weighted average method, center
of sums, etcetera.
5. Complexity It is quite simple. It is quite complicated.
6. Use
It can use IF-THEN rules for fuzzifying the
crisp value.
It uses the center of gravity methods to
find the centroid of the sets.
108. Fuzzification
• Fuzzification is the process of transforming a crisp set to a fuzzy set or a fuzzy set
to a fuzzier set, i.e.,crisp quantities are converted to fuzzy quantities. This operation
translates accurate crisp input values into linguistic variables.
• A Fuzzy set , a common fuzzification algorithm is performed by
keeping μi constant and xi being transformed to a fuzzy set Q(xi) depicting the
expression about xi. The fuzzy set Q(xi) is referred to as the kernel of fuzzification.
The fuzzified set A can be expressed as
where the symbol ~ means fuzzified.
109. Methods of Membership
Values Assignment
The method of assigning membership values are as
follows:
• Intuition
• Inference
• Rank ordering
• Angular fuzzy sets
• Neural networks
• Genetic algorithms
• Inductive reasoning
110. • Intuition
Intuition is simply derived from the
capacity of humans to develop
membership function through their own
innate intelligence and understanding.
Intuitions involve contextual and
semantic knowledge about an issue; it
can also involve linguistic truth values
about this knowledge.
111. Inference
In the inference method we used knowledge to perform
deductive reasoning. That is, we wish to deduce or infer a
conclusion, given a body of facts and knowledge.
we will define the following five types of triangles :
• I Approximate isosceles triangle
• R Approximate right triangle
• IR Approximate isosceles and right triangle
• E Approximate Equilateral triangle
• T Other triangles
112.
113.
114. Rank Ordering
Assessing preferences by a single individual, a committee,
a poll, and other opinion methods can be used to assign
membership values to a fuzzy variable. Preference is
determined by pair wise comparisons, and these determine
the ordering of the membership.
For example
115. Angular Fuzzy Sets
• Angular fuzzy sets differ from standard fuzzy sets only in their
coordinate description. Angular fuzzy sets are defined on a universe of
angles; hence there are repeating shapes for every 2 π cycles.
• In most applications angular fuzzy sets are used in quantitative
description of linguistic variables known as truth values. We can
suggest that the variable “truth” is no different from any other linguistic
variable in that it can be described by a fuzzy set.
• When a certain position has a membership value of 1 it is said to be
true, and when position has membership value 0 it is said to be false;
values in between 0 and 1 corresponds to a proposition being partially
true.
116. • The linguistic terms can be built in such
a way that a “neutral” (N) solution
corresponds to θ = 0 rad, “absolutely
basic” (AB) corresponds to 2π θ = rad, and
“absolutely acidic” (AA) corresponds to 2π
θ = − rad. Levels of pH between 7 and 0
are labeled as very acidic (VA), acidic (A),
fairly acidic (FA), and so on which are
represented between θ = 0 and 2π θ = − .
117. Neural Networks
A neural network is a massively parallel distributed processor made up of simple
processing units, which has a natural propensity for storing experiential
knowledge and making it available for use. It resembles the brain in two respects :
• Knowledge is acquired by the network from its environment through a
learning process.
• Interneuron connection strengths, known as synaptic weights, are used to
store the acquired knowledge.
We consider here a method by which a membership function may be created for
fuzzy classes of an input data set. We select a number of input data values and divide
them into training data set and a checking data set. The training data set is used to
train the neural network.
118. Table 3.1 :
Variable
Describing the
Data Points to be
Used as a
Training Data Set
Data Point
1 2 3 4 5 6 7 8 9 10
x1 0.05 0.09 0.12 0.15 0.20 0.75 0.80 0.82 0.90 0.95
x2 0.02 0.11 0.20 0.22 0.25 0.75 0.83 0.80 0.89 0.89
119.
120.
121. Genetic Algorithm
This uses Darwin’s theory of evolution – ‘existence of living
things based on the fact survival of the fittest. New breeds come
into existence through the process of
• Reproduction.
• Crossover.
• Mutation.
Data Number xi yi
1 1.0 1.0
2 2.0 2.0
3 3.0 3.0
4 4.0 4.0
122. for performing a linefit y = c1 x + c2, we first encode the parameters set c1, c2 in the
form of bit strings.
Bit strings are created with the random assignment of 1’s and zeros at different bit
locations.
We start with an initial population of 4 strings each of 12 bits in length.
The first 6 bits encode the parameters c1 and next 6 bits encode the parameters c2.
The min value of c1, c2 should be -2. The max value of c1, c2 should be +5. The
above values are given in problem and change accordingly.
By genetic algorithm generate the strings until we get a convergence to the solution
for a relative fitness value of 0.8
Each bit string is mapped to the value of a parameter Ci, by the mapping
123. Reproduction :-
Among the three genetic operators reproduction is the process by which strings
with better fitness vaules will send correspondingly better copies to next
generations.
Crossover :-
The second operator Crossover is the process in which the strings are able to
mix and match their desirable quantities in a random fashion.
Mutation :-
The third genetic operator mutation helps us in increasing the searching power.
To understand the concept of mutation, let us consider the case where
reproduction and crossover may not be able to find the optimum solution to a
problem. During the creation of a generation it happens sometimes that all
strings are missing a vital bit of information (for example bit d’o’ in all new
string in zero). So mutation becomes important where future generations created
using reproduction and crossover will not be able to give a convegent solution.
Mutation takes place very rarely with and its mutation rate is of the order of
0.005 / bit / generation
124. Inductive Reasoning
• An automatic generation of membership functions can also be accommodated
by using the essential characteristic of the inductive reasoning, which derives a
general consensus from the particular (derives the generic from specific).
• The induction is performed by the entropy minimisation principle, which
clusters most optimally the parameter corresponding to the output classes.
• This method is based on an ideal scheme that describes the input and output
relationship for a well established database, i.e. the method generates
memberships functions based solely on data provided.
• The method can be quite useful for complex systems where the data are
abundant and static. In situations where the data are dynamic, the method may
not be useful, since the membership functions will continually change with time.
125. The laws of induction are summarized here :
• Given a set of irreducible outcomes of an experiment, the induced probabilities
are those probabilities consistent with all available information that _maximize
the entropy of the set.
• The induced probability of a set of independent observations is proportional to
the probability density of the induced probability of a single observation.
• The induced rule is that rule consistent with all available information of which
the entropy is minimum.