Unit 6

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 126

UNIT-VI

INTRODUCTION TO PROBABILITY THEORY:

1
1.REASONING UNDER UNCERTAINTY
 • In many settings, we must try to understand what is
going on in a system when we have imperfect or incomplete
information.
• Two reasons why we might reason under uncertainty:
 1. laziness (modeling every detail of a complex system is
costly)
 2. ignorance (we may not completely understand the
system)
 • Example: deploy a network of smoke sensors to detect
fires in a building. Our model will reflect both laziness and
ignorance: – We are too lazy to model what, besides fire,
can trigger the sensors; – We are too ignorant to model how
fire creates smoke, what density of smoke is required to 2
2.USING PROBABILITY THEORY TO REASON UNDER
UNCERTAINTY
 • Probabilities quantify uncertainty regarding the occurrence of events
 . • Are there alternatives? Yes, e.g., Dempster-Shafer Theory, disjunctive
uncertainty, etc. (Fuzzy Logic is about imprecision, not uncertainty.)
 • Why is Probability Theory better? de Finetti: Because if you do not reason
according to Probability Theory, you can be made to act irrationally.
 • Probability Theory is key to the study of action and communication: –
Decision Theory combines Probability Theory with Utility Theory. –
Information Theory is “the logarithm of Probability Theory”.
 • Probability Theory gives rise to many interesting and important philosophical
questions (which we will not cover). 3 The only prerequisite: Set Theory A B
A∩B A B A∪B A\B A B For simplicity, we will work (mostly) with finite sets.
The extension to countably infinite sets is not difficult. The extension to
uncountably infinite sets requires Measure Theory. 4 Probability spaces
 • A probability space represents our uncertainty regarding an experiment.
 • It has two parts: 1. the sample space Ω, which is a set of outcomes; and 2. the
probability measure P, which is a real function of the subsets of Ω. Ω P ℜ A
3
P(A)
 • A set of outcomes A⊆ Ω is called an event. P(A)
represents how likely it is that the experiment’s actual
outcome will be a member of A. 5 An example probability
space
 • If our experiment is to deploy a smoke detector and see if
it works, then there could be four outcomes: Ω = {(fire,
smoke),(no fire, smoke),(fire, no smoke),(no fire, no
smoke)} Note that these outcomes are mutually exclusive.
 • And we may choose: – P({(fire, smoke),(no fire, smoke)})
= 0.005 – P({(fire, smoke),(fire, no smoke)}) = 0.003 – . . .
 • Our choice of P has to obey three simple rules. . . 6 The
three axioms of Probability Theory 1. P(A) ≥ 0 for all events
A 2. P(Ω) = 1 3. P(A ∪ B) = P(A) + P(B) for disjoint events A
and B Ω A P(A) + P(B) = P(A∪B) 0 1 B 7
4
2.BAYESIAN BELIEF NETWORK IN ARTIFICIAL INTELLIGENCE:
Bayesian belief network is key computer technology
for dealing with probabilistic events and to solve a
problem which has uncertainty. We can define a
Bayesian network as:
"A Bayesian network is a probabilistic graphical model
which represents a set of variables and their
conditional dependencies using a directed acyclic
graph."
It is also called a Bayes network, belief network,
decision network, or Bayesian model.
Bayesian networks are probabilistic, because these
networks are built from a probability distribution,
and also use probability theory for prediction and 5
Real world applications are probabilistic in nature, and to
represent the relationship between multiple events, we
need a Bayesian network. It can also be used in various
tasks including prediction, anomaly detection,
diagnostics, automated insight, reasoning, time
series prediction, and decision making under
uncertainty.
Bayesian Network can be used for building models from
data and experts opinions, and it consists of two parts:
Directed Acyclic Graph
Table of conditional probabilities.
The generalized form of Bayesian network that represents
and solve decision problems under uncertain knowledge
is known as an Influence diagram.
 6
7
Each node corresponds to the random variables, and
a variable can be continuous or discrete.
Arc or directed arrows represent the causal
relationship or conditional probabilities between
random variables. These directed links or arrows
connect the pair of nodes in the graph.
These links represent that one node directly influence
the other node, and if there is no directed link that
means that nodes are independent with each other
 In the above diagram, A, B, C, and D are random
variables represented by the nodes of the network
graph.
 If we are considering node B, which is connected with
node A by a directed arrow, then node A is called the
parent of Node B. 8
Node C is independent of node A.
The Bayesian network has mainly two
components:
Causal Component
Actual numbers
Each node in the Bayesian network has condition
probability distribution P(Xi |Parent(Xi) ), which
determines the effect of the parent on that node.
Bayesian network is based on Joint probability
distribution and conditional probability. So let's
first understand the joint probability distribution:
9
JOINT PROBABILITY DISTRIBUTION:
If we have variables x1, x2, x3,....., xn, then the
probabilities of a different combination of x1, x2, x3..
xn, are known as Joint probability distribution.
P[x1, x2, x3,....., xn], it can be written as the following
way in terms of the joint probability distribution.
= P[x1| x2, x3,....., xn]P[x2, x3,....., xn]
= P[x1| x2, x3,....., xn]P[x2|x3,....., xn]....P[xn-1|xn]P[xn].
In general for each variable Xi, we can write the
equation as:
P(Xi|Xi-1,........., X1) = P(Xi |Parents(Xi ))
10
EXPLANATION OF BAYESIAN NETWORK:
Let's understand the Bayesian network through an
example by creating a directed acyclic graph:
Example: Harry installed a new burglar alarm at his
home to detect burglary. The alarm reliably responds at
detecting a burglary but also responds for minor
earthquakes. Harry has two neighbors David and Sophia,
who have taken a responsibility to inform Harry at work
when they hear the alarm. David always calls Harry when
he hears the alarm, but sometimes he got confused with
the phone ringing and calls at that time too. On the other
hand, Sophia likes to listen to high music, so sometimes
she misses to hear the alarm. Here we would like to
compute the probability of Burglary Alarm. 11
Problem:
Calculate the probability that alarm has sounded, but
there is neither a burglary, nor an earthquake
occurred, and David and Sophia both called the Harry.
Solution:
The Bayesian network for the above problem is given below.
The network structure is showing that burglary and
earthquake is the parent node of the alarm and directly
affecting the probability of alarm's going off, but David and
Sophia's calls depend on alarm probability.
The network is representing that our assumptions do not
directly perceive the burglary and also do not notice the
minor earthquake, and they also not confer before calling.
The conditional distributions for each node are given as
conditional probabilities table or CPT. 12
Each row in the CPT must be sum to 1 because all the
entries in the table represent an exhaustive set of cases
for the variable.
In CPT, a boolean variable with k boolean parents
contains 2K probabilities. Hence, if there are two
parents, then CPT will contain 4 probability values
List of all events occurring in this network:
Burglary (B)
Earthquake(E)
Alarm(A)
David Calls(D)
Sophia calls(S)
13
We can write the events of problem statement in the
form of probability: P[D, S, A, B, E], can rewrite the
above probability statement using joint probability
distribution:
P[D, S, A, B, E]= P[D | S, A, B, E]. P[S, A, B, E]
=P[D | S, A, B, E]. P[S | A, B, E].P[A, B, E]
= P [D| A]. P [ S| A, B, E]. P[ A, B, E]
= P[D | A]. P[ S | A]. P[A| B, E]. P[B, E]
= P[D | A ]. P[S | A].P[A| B, E]. P[B |E]. P[E]

14
15
Let's take the observed probability for the Burglary
and earthquake component:
P(B= True) = 0.002, which is the probability of
burglary.
P(B= False)= 0.998, which is the probability of no
burglary.
P(E= True)= 0.001, which is the probability of a minor
earthquake
P(E= False)= 0.999, Which is the probability that an
earthquake not occurred.
We can provide the conditional probabilities as per the
below tables:
16
Conditional probability table for Alarm A:
The Conditional probability of Alarm A depends on
Burglar and earthquake:

17
CONDITIONAL PROBABILITY TABLE FOR DAVID CALLS:
The Conditional probability of David that he will call
depends on the probability of Alarm.

18
CONDITIONAL PROBABILITY TABLE FOR SOPHIA CALLS:
The Conditional probability of Sophia that she calls is
depending on its Parent Node "Alarm."

19
From the formula of joint distribution, we can write
the problem statement in the form of probability
distribution:
P(S, D, A, ¬B, ¬E) = P (S|A) *P (D|A)*P (A|¬B ^ ¬E)
*P (¬B) *P (¬E).
= 0.75* 0.91* 0.001* 0.998*0.999
= 0.00068045.
Hence, a Bayesian network can answer any query
about the domain by using Joint distribution.

20
THE SEMANTICS OF BAYESIAN NETWORK:
There are two ways to understand the semantics of the
Bayesian network, which is given below:
1. To understand the network as the
representation of the Joint probability
distribution.
It is helpful to understand how to construct the
network.
2. To understand the network as an encoding of a
collection of conditional independence
statements.
21
3.CERTAINTY FACTOR (CF):
The Certainty Factor (CF) is a numeric value which tells us
about how likely an event or a statement is supposed to be true. It
is somewhat similar to what we define in probability, but the
difference in it is that an agent after finding the probability of any
event to occur cannot decide what to do. Based on the probability
and other knowledge that the agent has, this certainty factor is
decided through which the agent can decide whether to declare
the statement true or false.
The value of the Certainty factor lies between -1.0 to +1.0,
where the negative 1.0 value suggests that the statement can
never be true in any situation, and the positive 1.0 value defines
that the statement can never be false. The value of the Certainty
factor after analyzing any situation will either be a positive or a
negative value lying between this range. The value 0 suggests that
the agent has no information about the event or the situation. 22
 A minimum Certainty factor is decided for every case through
which the agent decides whether the statement is true or false. This
minimum Certainty factor is also known as the threshold value.
For example, if the minimum certainty factor (threshold value) is
0.4, then if the value of CF is less than this value, then the agent
claims that particular statement false.
 Certainty factors are a compromise. The good news is that a system
based on rules with certainty factors requires the expert to come up
with only a small set of numbers (one for each rule) and will allow
fast computation of answers. The bad news is that the answer
computed may lead to irrational decisions.
 Certainty factors have been justified by their performance
(Mycin performed as well or better than expert doctors) and by
intuitive appeal (they satisfy the criteria listed on page 534).
However, they are subject to paradoxes where they compute bizarre
results (as in Exercise 16.1, page 536). If the rules that make up the
knowledge base are designed in a modular fashion, then problems
23
 do not arise, but it is certainly worrisome that the answers may be untrustworthy.
 Before Mycin, most reasoning with uncertainty was done using probability theory.
The laws of probability—in particular, Bayes’s law—provide a well-founded
mathematical formalism that is not subject to the inconsistencies of certainty factors.
Indeed, probability theory can be shown to be the only formalism that leads to
rational behavior, in the sense that if you have to make a series of bets on some
uncertain events, combining information with probability theory will give you the
highest expected value for your bets. Despite this, probability theory was largely set
aside in the mid-1970s. The argument made by Shortliffe and Buchanan (1975) was
that probability theory required too many conditional probabilities, and that people
were not good at estimating these. They argued that certainty factors were intuitively
easier to deal with. Other researchers of the time shared this view. Shafer, with later
refinements by Dempster, created a theory of belief functions that, like certainty
factors, represented a combination of the belief for and against an event. Instead of
representing an event by a single probability or certainty, Dempster-Shafer theory
maintains two numbers, which are analagous to the lower and upper bound on the
probability. Instead of a single number like .5, Dempster-Shafer theory would have an
interval like [.4,.6] to represent a range of probabilities. A complete lack of
knowledge would be represented by the range [0,1]. A great deal of effort in the late
1970s and early 1980s was invested in these and other nonprobabilistic theories.
Another example is Zadeh’s fuzzy set theory, which is also based on intervais. 24
 There is ample evidence that people have difficulty with problems involving
probability. In a very entertaining and thought-provoking series of articles,
Tversky and Kahneman (1974, 1983, 1986) show how people make irrational
choices when faced with problems that are quite simple from a mathematical
viewpoint. They liken these errors in choice to errors in visual perception
caused by optical illusions. Even trained doctors and statisticians are subject
to these errors.
 As an example, consider the following scenario. Adrian and Dominique are
to be married. Adrian goes for a routine blood test and is told that the results
are positive for a rare genetic disorder, one that strikes only 1 in 10,000
people. The doctor says that the test is 99% accurate–it gives a false positive
reading in only 1 in 100 cases. Adrian is despondent, being convinced that
the probability of actually having the disease is 99%. Fortunately, Dominique
happens to be a Bayesian, and quickly reassures Adrian that the chance is
more like 1 %. The reasoning is as follows: Take 10,001 people at random. Of
these, only 1 is expected to have the disease. That person could certainly
expect to test positive for the disease. But if the other 10,000 people all took
the blood test, then 1 % of them, or 100 people would also test positive. Thus,25
Doctors are trained in this kind of analysis, but
unfortunately many of them continue to reason more like
Adrian than Dominique.
In the late 1980s, the tide started to turn back to subjective
Bayesian probability theory. Cheeseman (1985) showed
that, while Dempster-Shafer theory looks like it can, in fact
it cannot help you make better decisions than probability
theory. Heckerman (1986) re-examined Mycin’s certainty
factors, showing how they could be interpreted as
probabilities. Judea Pearl’s 1988 book is an eloquent defense
of probability theory. He shows that there are efficient
algorithms for combining and propagating probabilities, as
long as the network of interdependencies does not contain
loops. It seems likely that uncertain reasoning in the 1990s
will be based increasingly on Bayesian probability theory. 26
4.DEMPSTER-SHAFER THEORY:
Dempster–Shafer theory is constructed with two
fundamental ideas: obtaining degrees of belief for one
question from subjective probabilities for a related
question, and Dempster’s rule of combining such
degrees of belief when they are based on independent
items of evidence.

27
JUGGLING BELIEF AND PLAUSIBILITY
Dempster’s rule of combination is sometimes
interpreted as an approximate generalisation of Bayes’
rule.
Belief in a hypothesis is calculated as the summation
of all these masses of all subsets of the hypothesis-set.
The value of belief gives a lower bound on its
probability.
Belief(Bel) ranges from 0 to 1 where 0 indicates no
evidence and 1 indicates certainty.
Plausibility(Pl) = 1-Bel.

28
For instance, there is certain news that needs to be
checked whether it is fake or factual. Shafer’s
framework allows for belief about such
propositions(say, the news is real) to be represented as
intervals, bounded by two values, belief(that the
proposition is right) and plausibility(the chances of
the news being really real). Subjective
probabilities(masses) are assigned to all subsets of the
frame.

29
Beliefs from different sources can be combined with various fusion
operators to model specific situations of belief fusion, e.g. with
Dempster’s rule of combination, which combines belief constraints. The
combination (called the joint mass) is calculated from the two sets of
masses m1 and m2 in the following manner:The null hypothesis is set to
zero by definition (it corresponds to “no solution”). The orthogonal
hypotheses “Real” and “Fake” have probabilities of 0.2 and 0.5(assigned
randomly), respectively.
30
Dempster Shafer Theory is given by Arthure P.Dempster in
1967 and his student Glenn Shafer in 1976.
This theory is being released because of following reason:-
Bayesian theory is only concerned about single evidences.
Bayesian probability cannot describe ignorance.
DST is an evidence theory, it combines all possible outcomes
of the problem. Hence it is used to solve problems where
there may be a chance that a different evidence will lead to
some different result.
The uncertainity in this model is given by:-
Consider all possible outcomes.
Belief will lead to believe in some possiblity by bringing out
some evidence.
Plausibility will make evidence compatiblity with possible
outcomes. 31
For eg:-
let us consider a room where four person are presented
A, B, C, D(lets say) And suddenly lights out and when
the lights come back B has been died due to stabbing
in his back with the help of a knife. No one came into
the room and no one has leaved the room and B has
not committed suicide. Then we have to find out who
is the murdrer?
To solve these there are the following possibilities:

Either {A} or{C} or {D} has killed him.


Either {A, C} or {C, D} or {A, C} have killed him.
Or the three of them kill him i.e; {A, C, D}
 32
These will be the possible evidences by which we can find
the murderer by measure of plausiblity.
Using the above example we can say :
Set of possible conclusion (P): {p1, p2….pn}
where P is set of possible conclusion and cannot be
exhaustive means at least one (p)i must be true.
(p)i must be mutually exclusive.
Power Set will contain 2n elements where n is number of
elements in the possible set.
For eg:-
If P = { a, b, c}, then Power set is given as
{o, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, {a, b, c}}= 2 3 elements.
Mass function m(K): It is an interpretation of m({K or B})
i.e; it means there is evidence for {K or B} which cannot be
divided among more specific beliefs for K and B.
33
Belief in K: The belief in element K of Power Set is
the sum of masses of element which are subsets of K.
This can be explained through an example
Lets say K = {a, b, c}
Bel(K) = m(a) + m(b) + m(c) + m(a, b) + m(a, c) +
m(b, c) + m(a, b, c)
Plaausiblity in K: It is the sum of masses of set that
intersects with K.
i.e; Pl(K) = m(a) + m(b) + m(c) + m(a, b) + m(b, c) +
m(a, c) + m(a, b, c)

34
CHARACTERISTICS OF DEMPSTER SHAFER THEORY:

 It will ignorance part such that probability of all events aggregate to


1.
 Ignorance is reduced in this theory by adding more and more
evidences.
 Combination rule is used to combine various types of possiblities.
 Advantages:
 As we add more information, uncertainty interval reduces.
 DST has much lower level of ignorance.
 Diagnose Hierarchies can be represented using this.
 Person dealing with such problems is free to think about evidences.
 Disadvantages:
 In this computation effort is high, as we have to deal with 2n of sets.
35
1.FUZZY SETS:
A fuzzy set is a mapping of a set of real numbers (xi)
onto membership values (ui) that (generally) lie in the range [0,
1]. In this fuzzy package a fuzzy set is represented by a set of pairs
ui/xi, where ui is the membership value for the real number xi.
We can represent the set of values as { u1/x1 u2/x2 ... un/xn }. The x
values in the set are in increasing order (x1 <= x2 <= ... <= xn).
Values prior to x1 have the same membership value as x1 and
values after xn have the same membership value as xn. Values
between xi and xi+1 are determined by the value that lies on the
straight line between the 2 consecutive points. In effect we are
representing a graph with straight lines joining the points in the
fuzzy set and with horizontal lines extending to the first and
36
from the last points.
 Just as a side note, it is common for the (x,y) pairs of a fuzzy set to be
represented as y/x in the fuzzy logic world. This can be a bit confusing
at first because the x,y order is reversed, but it might help to think of
the u/x meaning the membership value u at x.
 As an example, consider the (convex) fuzzy set { 0.0/0.3 1.0/0.5
0.0/0.7 }. As shown in the diagram below, this is a triangular shaped
fuzzy set. This is a very compact representation of a fuzzy set that
covers all values in the real number line.

37
The code to create this FuzzySet would simply be:
 FuzzySet fSet = new triangleFuzzySet( 0.3, 0.5, 0.7 );
 Consider now a slightly more complex (non-convex)
FuzzySet: { 0.0/0.1 1.0/0.3 0.65/0.4 1.0/0.5 0.0/0.8 }

38
 The code to create this 5 point fuzzy set might look something like:
 double yValues[] = {0, 1, 0.65, 1, 0};
double xValues[] = {0.1, 0.3, 0.4, 0.5, 0.8};
FuzzySet fSet = new FuzzySet( xValues, yValues, 5 );
 A fuzzy set defined by a single point, for example { 0.5/25 },
represents a single horizontal line (a fuzzy set with membership
values of 0.5 for all x values). Note that this is not a single point!
 To represent such singletons one might use { 0.0/0.5 1.0/0.5
0.0/0.5 }. This is in effect a graph that has membership values of
zero for all x values except at the x value 0.5 where it is 1. This sort of
fuzzy set is sometimes used to fuzzify crisp values (when there is
no error in the x value). Often a crisp value, such as a temperature
reading, is valid only within some tolerance so other fuzzy set
shapes are used to fuzzify the value, such as a PIFuzzySet or a
TriangleFuzzySet. As of version 1.3 of FuzzyJ, there is a
SingletonFuzzySet class that allows for easy creation of singleton
FuzzySets: 39
FuzzySet fSet = new SingletonFuzzySet( 0.5 );
Note that, when possible, the points stored will be
optimized in various ways to reduce the number
required. For example, if three points in a row have the
same y (membership) value then the middle point will
be dropped or if the first two or last two points have
the same y value then the first or last point will be
dropped.

40
FUZZY SET HIERARCHY
 To simplify the creation of FuzzySets a hierarchy of subclasses has been
defined. The FuzzySets that can be built by this set of subclasses
represents a fairly complete set of common shapes. The user is able to
sub-class and generate further types to meet specific needs. The hierarchy
is shown below.
 Each of these is explained in more detail in the API documentation.
However, let's consider the TriangleFuzzySet briefly. It is a sub-class of
(specialization of) a TrapezoidFuzzySet since it is basically a trapezoid
shape where the left and right sides of the trapezoid meet at the same
point. The TrapezoidFuzzySet is a sub-class of the LRFuzzySet which
defines shapes that have a left (L) part, a right (R) part and a middle part
(with all values set to 1). The left part slopes from a y-value (membership
value) of 0 to 1 and can have various shapes. The right part slopes from a y-
value of 1 to 0, and again can have various shapes. The TrapezoidFuzzySet
is just an LRFuzzySet with both the left and right parts being linear. The
LRFuzzySet and the TrapezoidFuzzySet are shown below. 41
42
To repeat, the TrapezoidFuzzyset is an LRFuzzySet
with the left and right sides defined to be linear rather
than arbitrary shapes. The TriangleFuzzySet is a
TrapezoidFuzzySet with points 2 and 3 at the same
location. In terms of simplicity of generation the
TrapezoidFuzzySet can be defined with 4 x-
coordinates and the TriangleFuzzySet only needs 3 x-
coordinates, whereas the LRFuzzyset requires that the
4 x-coordinates plus two functions that determine the
shape of the left and right sides. The simple
RectangleFuzzySet only needs 2 x-coordinates to be
defined.
43
WHERE ARE FUZZY SETS USED

Although one can create Fuzzy Sets and perform


various operations on them, in general they are mainly
used when creating Fuzzy Values and to define the
linguistic terms of Fuzzy Variables. This is described
in the section on Fuzzy Variables. At some point it may
be an interesting exercise to add FuzzyNumbers to the
toolkit. These would be specializations of FuzzySets
with a set of operations such as addition, subtraction,
multiplication and division defined on them.

44
2.SOME OF THE OPERATIONS ON FUZZYSETS:

The API documentation describes a large number of


operations and manipulations that can be applied to
FuzzySets. Most often there is a corresponding
capability for FuzzyValues with the restriction that the
UOD (universe of discourse, or range of x values) must
be observed for the FuzzyValues and for binary
operations, such as intersection and union, the two
FuzzyValues must have the same FuzzyVariable. The
most commonly used operations will be (see the
API documentation for the complete set of
operations):
45
FUZZYCOMPLEMENT

 Takes the compliment of the FuzzySet. More specifically, it takes the


compliment of the membership (y) values of the SetPoints of the
FuzzySet. Mathematically (NOT), ucompl(x) = 1 - u(x), or ycompl = 1 - y.
 FUZZY INTERSECTION
Returns the intersection of two FuzzySets. The visual representation of
the intersection of two example FuzzySets is depicted below. One set is
black with green SetPoints, and the other set is grey with orange
SetPoints. The diagram on the left is of the two FuzzySets, and the
diagram on the right is of the two sets showing the intersection set in
red (plain red SetPoints and red lines joining them). Intersection is
synonymous with the logical operator AND. The intersection of two
fuzzy sets is (often and specifically in FuzzyJ) defined such that the
membership (y) value at any x value is the minimum of the
membership values of the two fuzzy sets.
46
FUZZYUNION
Returns the union of two FuzzySets. The visual representation of the union
of two example FuzzySets is depicted below. One set is black with green
SetPoints, and the other set is grey with orange SetPoints. The diagram on
the left is of the two FuzzySets, and the diagram on the right is of the two
sets showing the union set in red (plain red SetPoints and red lines joining
them). Union is synonymous with the logical operator OR. The union of two
fuzzy sets is (often and specifically in FuzzyJ) defined such that the
membership (y) value at any x value is the maximum of the membership
values of the two fuzzy sets. 47
48
MAXIMUM OF INTERSECTION
Returns the maximum membership value of the
intersection set formed by two FuzzySets. Consider
the two diagrams below. On the right appears a
diagram of two sets, one set in black with green
SetPoints, and the other set in grey with orange
SetPoints. The maximum y value of the intersection is
denoted by a red dot on the graph on the right.

49
SOME DEFUZZIFICATION OPERATIONS ON FUZZYSETS
Below are some methods that convert a FuzzySet back into a
single crisp (non-fuzzy) value. This is something that is normally
done after a fuzzy decision has been made and the fuzzy result
must be used in the real world. For example, if the final fuzzy
decision were to adjust the temperature setting on the thermostat
a ‘little higher’, then it would be necessary to convert this ‘little
higher’ fuzzy value to the ‘best’ crisp value to actually move the
thermostat setting by some real amount. 50
MAXIMUM DEFUZZIFY

Finds the mean of the maximum values of a fuzzy set


as the defuzzification value. NOTE: This doesn't
always work well because there can be x ranges where
the y value is constant at the max value and other
places where the maximum value is only reached for a
single x value. When this happens the single value gets
too much of a say in the defuzzified value.

51
MOMENT DEFUZZIFY

Moment defuzzification defuzzifies a fuzzy set returning


a floating point (double value) that represents the fuzzy
set. It calculates the first moment of area of a fuzzy set
about the y axis. The set is subdivided into different
shapes by partitioning vertically at each point in the set,
resulting in rectangles, triangles, and trapezoids. The
centre of gravity (moment) and area of each subdivision
is calculated using the appropriate formulas for each
shape. The first moment of area of the whole set is then:

52
53
where xi' is the local centre of gravity, Ai is the local
area of the shape underneath line segment (pi-1, pi),
and n is the total number of points. As an example,

For each shaded subsection in the diagram above, the


area and centre of gravity is calculated according to the
shape identified (i.e., triangle, rectangle or trapezoid).
The centre of gravity of the whole set is then
determined:
x' = (2.333*1.0 + 3.917*1.6 + 5.5*0.6 +
6.333*0.3)/(1.0+1.6+0.6+0.3) = 3.943

54
WEIGHTEDAVERAGEDEFUZZIFY (NEW IN VERSION 1.3)
Finds the weighted average of the x values of the points that define a fuzzy
set using the membership values of the points as the weights. This value is
returned as the defuzzification value. For example, if we have the following
fuzzy set definition:
Then the weighted average value of the fuzzy set points will be:
(1.0*0.9 + 4.0*1.0) / (0.9 + 1.0) = 2.579
This is only moderately useful since the value at 1.0 has too much influence
on the defuzzified result. The moment defuzzification is probably most
useful in this case. However, a place where this defuzzification method is
very useful is when the fuzzy set is in fact a series of singleton values. It
might be that a set of rules is of the Takagi-Sugeno-Kang type (1 st order)
with formats like:
If x is A and y is B then c = k
where x and y are fuzzy variables and k is a constant that is represented by a
singleton fuzzy set. For example we might have rules that look like: 55
If temperature is low and pressure is low then set hot
valve to medium_high position
If temperature is high and pressure is high then set
hot valve to medium_low position
. . .
where the setting of the hot valve has several
possibilities, say full_closed, low, medium_low,
medium_high, high and full_open, and these are
singleton values rather than normal fuzzy sets. In this
case medium_low might be 2 on a scale from 0 to 5.
An aggregated conclusion for setting the hot valve
position (after all of the rules have contributed to the
decision) might look like:
56
And the weighted average defuzzification value for
this output would be:
(1.0*0.25 + 2.0*1.0 + 3.0*0.5 + 4.0*0.5) / (0.25 + 1.0 +
0.5 + 0.5) = 2.556
Note that neither a maximum defuzzification nor a
moment defuzzification would produce a useful result
in this situation. The maximum version would use
only 1 of the points (the maximum one) giving a result
of 2.0 (the x value of that point), while the moment
version would not find any area to work with and
would generate an exception. This description of the
weightedAverageDefuzzify method will be clearer after
you have completed the sections on FuzzyValues and
FuzzyRules. 57
A COMMENT ON THE RANGE OF MEMBERSHIP VALUES
 Although the range of allowed membership values is normally [0, 1], it is
possible to form FuzzySets with membership values > 1.0. There are instances
where this is desirable. For example in some approaches it is preferred to
collect the outputs of fuzzy rules by doing a fuzzySum of the resultant
FuzzyValues (global contribution of rules). The fuzzySum operation can
result in FuzzySets with membership values > 1.0. When a
FuzzySet/FuzzyValue is created with a constructor (that uses arrays of
Doubles or an array of SetPoints) the values are restricted to being between 0
and 1. However, when the fuzzySum operation or the methods
appendSetPoint and insertSetPoint are used to add points to the FuzzySet,
membership values > 1 are allowed.

 This does have some implications of which the user needs to be aware. For
example, the fuzzyComplement operation on a FuzzySet will treat
membership values > 1 as if they were 1. It may be desirable at certain times to
normalize (or scale) . 58
 Do note that membership values are always restricted to values >=
0. In most cases the negative value is simply changed to a value of 0.
 A case where a user might want to allow this to happen is when one
wants to use the SAM (Standard Additive Model) method as
described in Bart Kosko’s book, Fuzzy Engineering (
see reference section). In this case, the collection of fuzzy outputs
from multiple rules (global contribution) is done by adding (a
fuzzySum of) the outputs. The resultant sum is then defuzzified
using the momentDefuzzify method to give the required result. In
order to completely perform the SAM method one would also need
to ensure that the RuleExecutor was set to be a
MamdaniMinMaxMinRuleExecutor and that the operator used to
collect the results from multiple antecedents in a rule was the
ProductAntecedentCombineOperator. This is explained in more
detail elsewhere.

59
3.TYPES OF MEMBERSHIP FUNCTION:

If X is a universe of discourse and x E X , then a fuzzy


set A in X is defined as a set of ordered pairs such that-
<="" ins="" data-adsbygoogle-status="done"
style="box-sizing: border-box; background: rgb(255,
255, 255); text-decoration: none; display: inline-block;
width: 700px; height: 200px;">

60
Where, Ua(x) is called the membership function for the fuzzy
set A. Ua(x) map each element of X onto a membership grade
(or membership value) between 0 and 1 (both inclusive)
Advertisement
Example
X= All cities in India
A= City of comfort
A={ (Delhi,0.74),(Bhopal,0.8),(chennai,0.84) }
Membership function with discrete values
The membership values may be of discrete type.It is important
to note that either elements or their membership values or both
may be of discrete type values.
<="" ins="" data-adsbygoogle-status="done" style="box-sizing:
border-box; background: rgb(255, 255, 255); text-decoration: 61
 For example
 A ={ (0,0.1) , (1,0.30) , (2,0.75) … ( 10,0.1) }
 Here, x is discrete value and A is a happy family
 Question : For the given set how you would measure happiness
 <="" ins="" data-adsbygoogle-status="done" style="box-sizing: border-
box; background: rgb(255, 255, 255); text-decoration: none; display:
inline-block; width: 700px; height: 200px;">

62
Membership function with continuous values

Here, B= “Middle aged person”


B={ (x, Ub(X)) }
x=real value
63
VARIOUS TYPES OF MEMBERSHIP FUNCTIONS DISTRIBUTION
ARE

1.TRIANGULAR MEMBERSHIP
Triangular membership formula and distribution can
be represented as

64
2.TRAPEZOIDAL MEMBERSHIP
Trapezoidal membership formula and distribution can
be represented as

65
3.GAUSSIAN MEMBERSHIP
Gaussian membership formula and distribution can be
represented as

66
4.BELL SHAPED MEMBERSHIP FUNCTION
Bell shaped membership function formula can be
expressed as

67
5.SIGMOID MEMBERSHIP
Sigmoid membership formula can be represented as

68
4.MULTI VALUED LOGIC:
 In logic, a many-valued logic (also multi- or multiple-valued logic) is a
propositional calculus in which there are more than two truth values.
Traditionally, in Aristotle's logical calculus, there were only two possible values
(i.e., "true" and "false") for any proposition. Classical two-valued logic may be
extended to n-valued logic for n greater than 2. Those most popular in the
literature are three-valued (e.g., Łukasiewicz's and Kleene's, which accept the
values "true", "false", and "unknown"), the finite-valued (finitely-many valued)
with more than three values, and the infinite-valued (infinitely-many-valued),
such as fuzzy logic and probability logic.
 The first known classical logician who did not fully accept the
law of excluded middle was Aristotle (who, ironically, is also generally
considered to be the first classical logician and the "father of logic"[1]). Aristotle
admitted that his laws did not all apply to future events (De Interpretatione, ch.
IX), but he didn't create a system of multi-valued logic to explain this isolated
remark. Until the coming of the 20th century, later logicians followed
Aristotelian logic, which includes or assumes the law of the excluded middle. 69
 The 20th century brought back the idea of multi-valued logic. The Polish
logician and philosopher Jan Łukasiewicz began to create systems of many-
valued logic in 1920, using a third value, "possible", to deal with Aristotle's
paradox of the sea battle. Meanwhile, the American mathematician,
Emil L. Post (1921), also introduced the formulation of additional truth
degrees with n ≥ 2, where n are the truth values. Later, Jan Łukasiewicz and
Alfred Tarski together formulated a logic on n truth values where n ≥ 2. In
1932, Hans Reichenbach formulated a logic of many truth values
where n→∞. Kurt Gödel in 1932 showed that intuitionistic logic is not a
finitely-many valued logic, and defined a system of Gödel logics
intermediate between classical and intuitionistic logic; such logics are
known as intermediate logics.
 Kleene (strong) K3 and Priest logic P3[edit]
 Kleene's "(strong) logic of indeterminacy" K3 (sometimes {\displaystyle
K_{3}^{S}} ) and Priest's "logic of paradox" add a third "undefined" or
"indeterminate" truth value I. The truth functions for negation (¬),
conjunction (∧), disjunction (∨), implication (→K), and biconditional (↔K)
70
71
The difference between the two logics lies in how tautologies
are defined. In K3 only T is a designated truth value, while
in P3 both T and I are (a logical formula is considered a
tautology if it evaluates to a designated truth value). In
Kleene's logic I can be interpreted as being
"underdetermined", being neither true nor false, while in
Priest's logic I can be interpreted as being "overdetermined",
being both true and false. K3 does not have any tautologies,
while P3 has the same tautologies as classical two-valued
logic.[3]
Bochvar's internal three-valued logic[edit]
Another logic is Bochvar's "internal" three-valued logic {\
displaystyle B_{3}^{I}} , also called Kleene's weak three-valued
logic. Except for negation and biconditional, its truth tables
are all different from the above.[4] 72
The intermediate truth value in Bochvar's "internal" logic can
be described as "contagious" because it propagates in a
formula regardless of the value of any other variable.[4]
Belnap logic (B4)[edit]
Belnap's logic B4 combines K3 and P3. The overdetermined
truth value is here denoted as B and the underdetermined
truth value as N. 73
Gödel logics Gk and G∞[edit]
In 1932 Gödel defined[5] a family{\displaystyle G_{k}} of many-valued logics,
with finitely many truth values {\displaystyle 0,{\tfrac {1}{k-1}},{\tfrac {2}{k-1}},\
ldots ,{\tfrac {k-2}{k-1}},1} for example {\displaystyle G_{3}} has the truth
values {\displaystyle 0,{\tfrac {1}{2}},1} and {\displaystyle G_{4}} has {\
displaystyle 0,{\tfrac {1}{3}},{\tfrac {2}{3}},1}. In a similar manner he defined a
logic with infinitely many truth values, {\displaystyle G_{\infty }}in which the
truth values are all the real numbers in the interval {\displaystyle [0,1]}. The
74
designated truth value in these logics is
 1.The conjunction {\displaystyle \wedge } and the disjunction {\displaystyle \vee }
are defined respectively as the minimum and maximum of the operands:
 {\displaystyle {\begin{aligned}u\wedge v&:=\min\{u,v\}\\u\vee v&:=\max\{u,v\}\
end{aligned}}}Negation {\displaystyle \neg _{G}} and implication {\displaystyle {\
xrightarrow[{G}]{}}} are defined as follows:
 {\displaystyle {\begin{aligned}\neg _{G}u&={\begin{cases}1,&{\text{if }}u=0\\0,&{\
text{if }}u>0\end{cases}}\\u{\xrightarrow[{G}]{}}v&={\begin{cases}1,&{\text{if }}u\
leq v\\v,&{\text{if }}u>v\end{cases}}\end{aligned}}}
 Gödel logics are completely axiomatisable, that is to say it is possible to define a
logical calculus in which all tautologies are provable.
 Łukasiewicz logics Lv and L∞[edit]
 Implication {\displaystyle {\xrightarrow[{L}]{}}} and negation {\displaystyle {\
underset {L}{\neg }}} were defined by Jan Łukasiewicz through the following
functions:
 {\displaystyle {\begin{aligned}{\underset {L}{\neg }}u&:=1-u\\u{\xrightarrow[{L}]
{}}v&:=\min\{1,1-u+v\}\end{aligned}}}
 At first Łukasiewicz used these definition in 1920 for his three-valued logic {\
displaystyle L_{3}}with truth values {\displaystyle 0,{\tfrac {1}{2}},1}. In 1922 he
developed a logic with infinitely many values {\displaystyle L_{\infty }}, in which 75
By adopting truth values defined in the same way as for Gödel logics {\
displaystyle 0,{\tfrac {1}{v-1}},{\tfrac {2}{v-1}},\ldots ,{\tfrac {v-2}{v-1}},1}, it
is possible to create a finitely-valued family of logics {\displaystyle L_{v}} ,
the abovementioned {\displaystyle L_{\infty }} and the logic {\displaystyle
L_{\aleph _{0}}}, in which the truth values are given by the
rational numbers in the interval {\displaystyle [0,1]}. The set of tautologies
in {\displaystyle L_{\infty }} and {\displaystyle L_{\aleph _{0}}} is identical.
Product logic Π[edit]
In product logic we have truth values in the interval {\displaystyle [0,1]}, a
conjunction {\displaystyle \odot } and an implication {\displaystyle {\
xrightarrow[{\Pi }]{}}}, defined as follows [7]
{\displaystyle {\begin{aligned}u\odot v&:=uv\\u{\xrightarrow[{\Pi }]
{}}v&:={\begin{cases}1,&{\text{if }}u\leq v\\{\frac {v}{u}},&{\text{if }}u>v\
end{cases}}\end{aligned}}}
Additionally there is a negative designated value {\displaystyle {\overline
{0}}} that denotes the concept of false. Through this value it is possible to
define a negation {\displaystyle {\underset {\Pi }{\neg }}}and an additional 76
5.FUZZY LOGIC:
Fuzzy Logic (FL) is a method of reasoning that
resembles human reasoning. The approach of FL
imitates the way of decision making in humans that
involves all intermediate possibilities between digital
values YES and NO.
The conventional logic block that a computer can
understand takes precise input and produces a definite
output as TRUE or FALSE, which is equivalent to
human’s YES or NO.
The inventor of fuzzy logic, Lotfi Zadeh, observed that
unlike computers, the human decision making
includes a range of possibilities between YES and NO,
such as − 77
The fuzzy logic works on the levels of
possibilities of input to achieve the
definite output.

78
IMPLEMENTATION

It can be implemented in systems with


various sizes and capabilities ranging
from small micro-controllers to large,
networked, workstation-based control
systems.
It can be implemented in hardware,
software, or a combination of both.
79
Why Fuzzy Logic?
Fuzzy logic is useful for commercial and practical
purposes.
It can control machines and consumer products.
It may not give accurate reasoning, but acceptable
reasoning.
Fuzzy logic helps to deal with the uncertainty in
engineering.
Fuzzy Logic Systems Architecture
It has four main parts as shown −
Fuzzification Module − It transforms the system
inputs, which are crisp numbers, into fuzzy sets. It
splits the input signal into five steps such as 80
Knowledge Base − It stores IF-THEN rules provided by
experts.
Inference Engine − It simulates the human reasoning
process by making fuzzy inference on the inputs and IF-
THEN rules.
Defuzzification Module − It transforms the fuzzy set
obtained by the inference engine into a crisp value.
81
The membership functions work on fuzzy sets of variables.
Membership Function
Membership functions allow you to quantify linguistic term and
represent a fuzzy set graphically. A membership function for a
fuzzy set A on the universe of discourse X is defined as μA:X →
[0,1].
82
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.
All membership functions for LP, MP, S,
MN, and LN are shown as below −
83
The triangular membership function shapes are most
common among various other membership function
shapes such as trapezoidal, singleton, and Gaussian.
Here, the input to 5-level fuzzifier varies from -10 volts
to +10 volts. Hence the corresponding output also
changes.
84
Example of a Fuzzy Logic System
Let us consider an air conditioning system with 5-level
fuzzy logic system. This system adjusts the
temperature of air conditioner by comparing the room
temperature and the target temperature value.

85
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)

86
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 −

87
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.
88
Build a set of rules into the knowledge base in the
form of IF-THEN-ELSE structures.
89
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.
90
Application Areas of Fuzzy Logic
The key application areas of fuzzy logic are as given −

91
Automotive Systems
 Automatic Gearboxes
 Four-Wheel Steering
 Vehicle environment control
Consumer Electronic Goods
 Hi-Fi Systems
 Photocopiers
 Still and Video Cameras
 Television 92
Domestic Goods

 Microwave Ovens
 Refrigerators
 Toasters
 Vacuum Cleaners
 Washing Machines
Environment Control

 Air Conditioners/Dryers/Heaters
 Humidifiers
93
 Advantages of FLSs
 Mathematical concepts within fuzzy reasoning are very simple.
 You can modify a FLS by just adding or deleting rules due to flexibility of
fuzzy logic.
 Fuzzy logic Systems can take imprecise, distorted, noisy input information.
 FLSs are easy to construct and understand.
 Fuzzy logic is a solution to complex problems in all fields of life, including
medicine, as it resembles human reasoning and decision making.
 Disadvantages of FLSs
 There is no systematic approach to fuzzy system designing.
 They are understandable only when simple.
 They are suitable for the problems which do not need high accuracy.

94
6.LINGUISTIC VARIABLES AND HEDGES IN FUZZY LOGIC:

In general, a fuzzy system is any system whose variables (or, at least,
some of them) range over states that are fuzzy numbers rather than real
numbers. These fuzzy numbers may represent linguistic terms such as
“very small,” “medium,” and so on, as interpreted in a particular
context. If they do, the variables are called linguistic variables.
Each linguistic variable is defined in terms of a base variable, whose
values are real numbers within a specific range. A base variable is a
variable in the usual sense, as exemplified by any physical variable
(e.g., temperature, pressure, electric current, magnetic flux, etc.) as
well as any other numerical variable (e.g., interest rate, blood count,
age, performance, etc.).

95
 In a linguistic variable, linguistic terms representing approximate values of a base
variable, relevant to a particular application, are captured by approximate fuzzy
numbers. That is, each linguistic variable consists of the following elements:
•
 A name, which should capture the meaning of the base variable involved
•
 A base variable with its range of values (a closed interval of real numbers)
•
 A set of linguistic terms that refer to values of the base variable
•
 A semantic rule, which assigns to each linguistic term its meaning—an
appropriate fuzzy number defined on the range of the base variable.

96
An example of a linguistic variable is shown in Fig.
3. Its name is “performance,” which captures the
meaning of the associated base variable—a variable
that expresses the performance (in percentage) of a
goal-oriented entity (a person, machine, organization,
method, etc.) in some context by real numbers in the
interval [0,100], Linguistic values (states) of the
linguistic variable are “very
small,” “small,” “medium,” “large,” and “very large.”
Each of these linguistic terms is assigned one of the
trapezoidal-shaped fuzzy numbers by a semantic rule,
as shown in Fig. 3.
97
98
7.PROPOSITION IN FUZZY LOGIC:

The use of linguistic variables and fuzzy propositions in the


interval-valued L-Fuzzy contexts can be an interesting tool to
extract a more complete information from them. In this paper,
we analyze three different situations. First, we obtain
significant relations in order to study all the objects and
attributes of the interval-valued L-Fuzzy context by means of
the interval-valued L-Fuzzy concepts. After that, we show how
to replace the erroneous values to be able to study in a suitable
way the context. Finally, we use the linguistic labels to obtain a
subcontext that represents our interest of study. We also show
an experimental evaluation in the paper.

99
The Formal Concept Theory was developed by Wille [1], [2] and
tries to extract some information from a binary table that
represents a formal context (G,M,I) with G and M, two finite sets
(of objects and attributes, respectively) and I, a binary relation
between them.
The L-Fuzzy contexts have been studied [3], [4], [5], [6], [7] as an
extension to the fuzzy case of the Wille’s formal contexts when the
relation between the objects and the attributes that we want to
study takes values in a complete lattice L. That is, the L-Fuzzy
context is defined as a tuple (L,X,Y,R), with L a complete
lattice, X and Y sets of objects and attributes, respectively
and R∈LX×Y an L-Fuzzy relation between the objects and the
attributes.

100
Moreover, in order to extract knowledge from a table
with incomplete information, we have used the
interval-valued L-Fuzzy contexts [8], [3] as an
extension to the interval-valued case [9] of the L-
Fuzzy contexts given by an implication operator [3],
[10], [11].
Using these interval-valued L-Fuzzy contexts, we
study situations where the relationships between the
objects and the attributes are interval-valued.
Let (L,≤) be a complete lattice, and let J[L]={[α,β]|
α,β∈L,α≤β} be the set of intervals on L. (J[L],≤) is
also a complete lattice with the
order[α,β]≤[γ,δ]⇔{α≤γβ≤δ. 101
 Definition 1
 An interval-valued L-fuzzy context is a tuple (J[L],X,Y,R),
with X and Y two finite sets (of objects and attributes) and R an interval-
valued L-fuzzy relation between them.
 We extract interval-valued L-Fuzzy concepts from the interval-valued L-
Fuzzy context.
 Definition 2
 Let I:J[L]×J[L]→J[L] be an interval-valued fuzzy implication operator
defined on the set of intervals J[L] [12]. Given A∈J[L]X and B∈J[L]Y two
interval-valued L-fuzzy sets, the derived sets of A and B, denoted
by A1∈J[L]Y and B2∈J[L]X, respectively, are defined
as:A1(y)=infx∈X{I(A(x),R(x,y))}B2(x)=infy∈Y{I(B(y),R(x,y))}.
 Definition 3
 If A is a fixed point of the operator φ defined as φ(A)=(A1)2, then (A,A1) is
an interval-valued L-fuzzy concept of the interval-valued L-fuzzy
context (J[L],X,Y,R).
102
 This interval-valued L-fuzzy concept represents a group of
objects A (extension) that share, in a fuzzy way, the attributes
of A1 (intension). In general, to interpret an interval-valued L-Fuzzy
concept, we will focus on the objects and attributes whose membership
values stand out against the others.
 In the following, we will only use residuated implications. As is known (see
[5]), in these cases the poset of the concepts is a complete lattice for every
lattice L. In particular, it is verified when the elements of L are intervals.
 The set of the interval-valued L-Fuzzy concepts with the order
relation ⪯∗ defined by (A,B)⪯∗(C,D)⇔A⪯C is a complete lattice,
being ⪯ the usual order between L-Fuzzy sets: A⪯C⇔A(x)≤C(x),∀x∈L.
 We can also obtain the closed interval-valued L-Fuzzy concept to a departure
set A∈J[L]X that represents our interest of study. This process depends on
the implication operator I used [10], [4], [5].

103
 There is another new work about interval-valued concepts due to Djouadi
and Prade [13].
 In the next section, we will give some results related to linguistic variables
and fuzzy propositions that will be used in the interval-valued L-Fuzzy
contexts. Specifically, we will study significant relations in Section 3,
replacement of erroneous values in Section 4 and subcontexts in Section 5.
 2. Linguistic variables and fuzzy propositions defined in the set of
closed intervals of [0,1]
 2.1. Interval-valued linguistic variables
 Let (V,T(V),U,G,M) be a linguistic variable [14] defined in the set U whose
values are words or sentences, and where V is the name of the
variable, T(V) is the set of linguistic labels or values, U is the Universe of
discourse, G is a syntactic rule which generates the values of T(V) and M is
the semantic rule which assigns to each linguistic value t∈T(V) its
meaning M(t), that is a fuzzy set of U.
 The meaning of a linguistic label t is characterized by a compatibility
function ct:U→[0,1] which assigns its compatibility with U to every t.
 We have extended the linguistic variable definition to the interval-valued
104
case [15].
Definition 4
Taking as a departure point a linguistic variable V, we define
an interval-valued linguistic variable associated with V as the
linguistic variable V defined in the set J[U] of the closed
intervals of U, characterized by the tuple (V,T(V),J[U],G,M),
where the compatibility function with each label t∈T(V) is
given by ct:J[U]→J[0,1], where:(1)ct([α,β])=[minx∈[α,β]
{ct(x)},maxx∈[α,β]{ct(x)}].
With this definition, we try to represent the interval in
which ct(x) has its values when x∈[α,β].
Notation. We denote the compatibility of the value x∈U with
the label t by xt. In the same way, the compatibility of the
interval [α,β]∈J[U] with the label t will be denoted by [α,β]t.
105
Remark 1
The linguistic labels of a linguistic variable are usually
represented by a fuzzy number (i.e., a normal and convex fuzzy
subset). Therefore, the compatibility of the
value [α,β]∈J[U] with the label t given in Eq. (1) can be
calculated as:
(2)ct([α,β])=[α,β]t=={[min{αt,βt},max{αt,βt}]if α≥b or β≤a[mi
n{αt,βt},1]in other casewhere a and b are the values such
that xt=1,∀x∈[a,b].
The defined interval-valued linguistic variable V is an
extension of the linguistic variable V to the set of closed
intervals of U.
Some properties of these interval-valued linguistic variables
have been proved in [15].
106
8.INFERENCE RULES FOR FUZZY PROPOSITIONS:
When information is incomplete, fuzzy logic is useful [10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]. Many theories [1, 2]
deal with incomplete information based on likelihood (probability),
whereas fuzzy logic is based on belief. Zadeh defined fuzzy set with
single membership function. Zadeh [3], Mamdani [4], TSK [2] and
Reddy [5] are studied fuzzy conditional inferences. The fuzzy
conditions are of the form “if <. Zadeh, Mamdani and TSK fuzzy
conditional inference requires both precedent-part and consequent-part
but 5fuzzy inferences don’t require consequent part. Precedent-part >
then <consequent-part >.”
Zadeh [6] studied fuzzy logic with single membership function. The
single membership function for the proposition “x is A” contains how
much truth in the proposition. The fuzzy set with two membership
functions will contain more information in terms of how much truth
and false it has in the proposition. 107
2. Fuzzy log with single membership function
Zadeh [6] has introduced a fuzzy set as a model to deal with
imprecise, inconsistent and inexact information. The fuzzy set
is a class of objects with a continuum of grades of membership.
The fuzzy set A of X is characterized as its membership
function A = μA(x) and ranging values in the unit interval [0, 1]
μA(x): X ➔[0, 1], x Є X,
where X is the universe of discourse.
A = μA(x1)/x1 + μA(x2)/x2 + … + μA(xn)/xn,
where “+” is the union.
 For instance, the fuzzy proposition “x is High”
High = 0.2/x1 + 0.6/x2 + 0.9/x3 + 0.6/x4 + 0.2/x5
Not High = 0.8/x1 + 0.4/x2 + 0.1/x3 + 0.4/x4 + 0.8/x5
108
 For instance, the fuzziness of “Temperature is high” is 0.8
 The graphical representation of young and not young is shown in Figure 1
.
 Figure 1.
 Fuzzy membership function.
 The fuzzy logic is defined as a combination of fuzzy sets using logical
operators. Some of the logical operations are given below.
 For example, A, B and C are fuzzy sets. The operations on fuzzy sets are given
as:
 Negation
 If x is not A
 A′ = 1 − μA(x)/x
 Conjunction
 x is A and y is B➔ (x, y) is A ΛB
 AΛB = min(μA(x), μB(y)}(x,y)
 If x = y
 x is A and y is B➔ (x, y) is A ΛB 109
 For example
 A = 0.2/x1 + 0.6/x2 + 0.9/x3 + 0.6/x4 + 0.2/x5
 B = 0.4/x1 + 0.6/x2 + 0.9/x3 + 0.6/x4 + 0.1/x5
 AΛB = 0.2/x1 + 0.6/x2 + 0.9/x3 + 0.6/x4 + 0.1/x5
 The graphical representation is shown in Figures 1 and 2.
 Figure 2.
 Conjunction.
 Disjunction
 x is A and y is B➔ (x, y) is A V B
 A V B = max(μA(x), μB(y)}(x,y)
 If x = y
 x is A and y is B➔ (x, y) is A V B
 AVB = max(μA(x), μB(y)}/xFor instance,
 A = 0.2/x1 + 0.6/x2 + 0.9/x3 + 0.6/x4 + 0.2/x5
 B = 0.4/x1 + 0.6/x2 + 0.9/x3 + 0.6/x4 + 0.1/x5
110
 AVB = 0.4/x + 0.6/x + 0.9/x + 0.6/x + 0.2/x
 The graphical representation is shown in Figure 3.
 Figure 3.
 Disjunction.
 Concentration
 μvery A(x) = μA(x)2
 Diffusion
 μmore or less A(x) = μA(x)0.5
 The graphical representation of concentration and diffusion is shown in Figure 4.
 Figure 4.
 Fuzzy quantifiers.
 Implication
 Zadeh [6], Mamdani [7] and Reddy [5] fuzzy conditional inferences are considered for
fuzzy control systems. If x1 is A1 and x2 is A2 and … and xn is An, then y is B
 The presidency part may contain any number of “and/or”
 Zadeh [6] fuzzy inference is given as:
 If x1 is A1 and x2 is A2 and … and xn is An, then y is B
 = min(1, 1 − (A1, A2,…, An) + B)
111
Mamdani [4] fuzzy inference is given as:
If x1 is A1 and x2 is A2 and … and xn is An, then y is B
= min(A1, A2,…, An, B)
Zadeh and Mamdani fuzzy inference has prior information of A and B.
The relation between A and B is known. Then, B is derived from A.
Reddy [2] inference is given by:
If x1 is A1 and x2 is A2 and … and xn is An, then y is B
= min(A1, A2,…,An)
Consider the fuzzy rule:
If x1 is A1 and x2 is A2, then x is B
For instance,
A1 = 0.2/x1 + 0.6/x2 + 0.9/x3 + 0.6/x4 + 0.2/x5
A2 = 0.5/x1 + 0.7/x2 + 0.9/x3 + 0.7/x4 + 0.3/x5
112

9. Fuzzy Systems:
Fuzzy Logic Systems (FLS) produce acceptable but definite output
in response to incomplete, ambiguous, distorted, or inaccurate
(fuzzy) input.
What is Fuzzy Logic?
Fuzzy Logic (FL) is a method of reasoning that resembles human
reasoning. The approach of FL imitates the way of decision making
in humans that involves all intermediate possibilities between
digital values YES and NO.
The conventional logic block that a computer can understand takes
precise input and produces a definite output as TRUE or FALSE,
which is equivalent to human’s YES or NO.
The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike
computers, the human decision making includes a range of 113
The fuzzy logic works on the levels of possibilities of input to achieve the definite output.
Implementation
It can be implemented in systems with various sizes and capabilities ranging from small
micro-controllers to large, networked, workstation-based control systems.
It can be implemented in hardware, software, or a combination of both.

Why Fuzzy Logic?


Fuzzy logic is useful for commercial and practical purposes.
It can control machines and consumer products.
It may not give accurate reasoning, but acceptable reasoning.
Fuzzy logic helps to deal with the uncertainty in engineering.
114
Fuzzy Logic Systems Architecture
It has four main parts as shown −
Fuzzification Module − It transforms the system
inputs, which are crisp numbers, into fuzzy sets. It
splits the input signal into five steps such as −

115
Knowledge Base − It stores IF-THEN rules provided by
experts.
Inference Engine − It simulates the human reasoning
process by making fuzzy inference on the inputs and IF-
THEN rules.
Defuzzification Module − It transforms the fuzzy set
obtained by the inference engine into a crisp value.

The membership functions work on fuzzy sets of variables.

116
Membership Function
Membership functions allow you to quantify linguistic term and
represent a fuzzy set graphically. 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.
All membership functions for LP, MP, S, MN, and LN are shown as
below −
117
The triangular membership function shapes are most common among various other
membership function shapes such as trapezoidal, singleton, and Gaussian.
Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the
corresponding output also changes.
Example of a Fuzzy Logic System
Let us consider an air conditioning system with 5-level fuzzy logic system. This system
adjusts the temperature of air conditioner by comparing the room temperature and
the target temperature value.
118
119
 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)
 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.
120
Step 2 − Construct membership functions for them
The membership functions of temperature variable are as
shown −

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. 121
Build a set of rules into the knowledge base in the form of IF-
THEN-ELSE structures.

122
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.
123
Application Areas of Fuzzy Logic
The key application areas of fuzzy logic are as given −
Automotive Systems
Automatic Gearboxes
Four-Wheel Steering
Vehicle environment control
124
Consumer Electronic Goods
Hi-Fi Systems
Photocopiers
Still and Video Cameras
Television
Domestic Goods
Microwave Ovens
Refrigerators
Toasters
Vacuum Cleaners
Washing Machines
Environment Control
Air Conditioners/Dryers/Heaters 125
 Advantages of FLSs
 Mathematical concepts within fuzzy reasoning are very simple.
 You can modify a FLS by just adding or deleting rules due to
flexibility of fuzzy logic.
 Fuzzy logic Systems can take imprecise, distorted, noisy input
information.
 FLSs are easy to construct and understand.
 Fuzzy logic is a solution to complex problems in all fields of life,
including medicine, as it resembles human reasoning and
decision making.
 Disadvantages of FLSs
 There is no systematic approach to fuzzy system designing.
 They are understandable only when simple.
 They are suitable for the problems which do not need high
accuracy.
*************************THE END***************************
126

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy