Neural Networks and Fuzzy Logic
Neural Networks and Fuzzy Logic
Neural Networks and Fuzzy Logic
A useful attribute of sets and the universes on which they are defined is a metric
known as the cardinality, or the cardinal number.
The total number of elements in a universe X is called its cardinal number;
denoted nx, where x again is a label for individual elements in the universe.
Discrete universes that are composed of a countably finite collection of elements will
have a finite cardinal number; continuous universes comprises an infinite collection of
elements will have an infinite cardinality.
Collections of elements within a universe are called sets, and collections of
elements within sets are called subsets. Sets and subsets are terms that are often used
synonymously, since any set is also a subset of the universal set X.
The collection of all possible sets in the universe is called the whole set.
Example
For crisp sets A and B consisting of collections of some elements in X, the following
notation is defined:
x X x belongs to X
x A x belongs to A
x A x does not belong to A
Null set, , as the set containing no elements, and the whole set, X, as the set of all
elements in the universe.
All possible sets of X constitute a special set called the power set, Denoted by P(X).
The cardinality of the power set, denoted nP(X), is found as nP(X) = 2nX.
If the cardinality of the universe is infinite, then the cardinality of the power set is also
infinity
Operations on Classical Sets
Complement of set A.
Difference operation A| B.
The most appropriate properties for defining classical sets and showing their similarity
to fuzzy sets are:
Commutativity AB=BA
AB=BA.
Associativity A (B C ) = (A B) C
A (B C ) = (A B) C.
Distributivity A (B C ) = (A B) (A C)
A (B C ) = (A B) (A C).
Idempotency AA=A
A A = A.
Identity A=A
AX=A
A = .
AX=X.
Transitivity If A B and B C , then A C.
Involution = A.
Two special properties of set operations are known as the excluded middle axioms and
De Morgans principles. These properties are enumerated here for two sets A and B.
The excluded middle axioms are very important because these are the only set
operations that are not valid for both classical sets and fuzzy sets.
The first, called the axiom of the excluded middle, deals with the union of a set A and
its complement;
A =X
The second, called the axiom of contradiction, represents the intersection of a set A and
its complement.
A =
De Morgans principles
= .
= .
De Morgans principles can be stated for n sets
= U U
=
Mapping of Classical Sets to Functions
Fuzzy Sets
In classical, or crisp, sets the transition for an element in the universe between
membership and non membership in a given set is abrupt and well defined (said to be crisp).
A fuzzy set, is a set containing elements that have varying degrees of membership in
the set.
Elements of a fuzzy set are mapped to a universe of membership values using a
function-theoretic form.
Fuzzy sets are denoted in this text by a set symbol with a tilde under strike.
would be the fuzzy set A. This function maps elements of a fuzzy set to a real
numbered value on the interval 0 1.
If an element in the universe, say x, is a member of fuzzy set , then this mapping is
given by Equation
When the universe, X, is continuous and infinite, the fuzzy set is denoted as
The numerator in each term is the membership value in set associated with the
element of the universe indicated in the denominator.
Union:
Intersection
Complement
Fuzzy sets follow the same properties as crisp sets. Because of this fact and because the
membership values of a crisp set are a subset of the interval [0, 1], classical sets can be
thought of as a special case of fuzzy sets.
The properties of fuzzy sets are
( ) ( )
( ) ( )
( )( ) ( ) ( )
( )( ) ( ) ( )( )
( )( ) ( )( )( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
Relations represent the mapping of the sets. Relations are intimately involved in logic,
approximate reasoning, classification, rule-based systems, pattern recognition, and control.
In the case of crisp sets relation there are only two degrees of relationship between the
elements of sets in a crisp relation, i.e., completely related and not related.
A crisp relation represents the presence or absence of association, interaction, or
interconnectedness between the elements of two or more sets.
Fuzzy relations have infinite number of relationship between the extremes of
completely related and not related between the elements of two or more sets considered.
Degrees of association can be represented by membership grades in a fuzzy relation by
membership grades in a fuzzy relation in the same way as degrees of set membership are
represented in the fuzzy set.
Crisp set can be viewed as a restricted case of the more general fuzzy set concept.
Let be a fuzzy set on universe X and be a fuzzy set on universe Y, then the
Cartesian product between fuzzy sets and will result in a fuzzy relation which is
contained with the full Cartesian product space
Membership function describes the information contained in a fuzzy set and is useful to
develop a lexicon of terms to describe various special features of this function.
For purposes of simplicity, the functions shown in the figures will all be continuous, but
the terms apply equally for both discrete and continuous fuzzy sets.
The sketch of a membership function consists of 3 regions
1. Core
2. Support
3. Boundary
Core
The core of a membership function for
some fuzzy set is defined as that region of
the universe that is characterized by
complete and full membership in the set
.That is, the core comprises those
elements x of the universe such that
( )
Support
Boundaries
The boundaries of a membership function for some fuzzy set are defined as that
region of the universe containing elements that have a nonzero membership but not complete
membership.
The boundaries comprise those elements x of the universe such that ( )
These elements of the universe are those with some degree of fuzziness, or only partial
membership in the fuzzy set .
Crossover point
The height of the fuzzy set is the maximum value of the membership function, max ( ( ))
The membership functions can be symmetrical or asymmetrical. Membership value is
between 0 and 1.
Based on the membership functions fuzzy sets are classified into two categories
Normal fuzzy set: If the membership function has at least one element in the universe
whose value is equal to 1, then that set is called as normal fuzzy set.
Subnormal fuzzy set: If the membership function has the membership values less than 1,
then that set is called as subnormal fuzzy set.
Fuzzification: Fuzzification is the process where the crisp quantities are converted to fuzzy
(crisp to fuzzy). By identifying some of the uncertainties present in the crisp values, fuzzy
values are formed.
The conversion of fuzzy values is represented by the membership functions. Thus
fuzzification process involve assigning membership values for the given crisp quantities.
In the real world, hardware such as a digital voltmeter generates crisp data, but these
data are subject to experimental error. The representation of imprecise data as fuzzy sets is a
useful but not mandatory step when those data are used in fuzzy systems.
For representing this kind of data, data is considered as a crisp. The crisp data is
compared with a fuzzy set.
There are various methods to assign the membership values or the membership
functions to fuzzy variables.
Intuition
Inference,
Rank ordering,
Angular fuzzy sets,
Neural networks,
Genetic algorithms, and
Inductive seasoning
Intuition
Intuition is based on the humans own intelligence and understanding to develop the
membership functions. The thorough knowledge of the problem has to be known, the
knowledge regarding the linguistic variable should also
be known.
For example, consider the speed of a dc-motor.
The shape of the universe of speed given in rpm is
shown in Figure. The curves represent membership
function corresponding to various fuzzy variables. The
range of speed is splitted into low, medium, and high.
The curves differentiate the ranges, said by humans.
The placement of curves is approximate over the
universe of discourse; the number of curves and the
overlapping of curves is an important criteria to be
considered while defining membership functions
Inference
This method involves the knowledge to perform deductive reasoning. The membership
function is formed from the facts known and knowledge.
Rank Ordering
The polling concept is used to assign membership values by rank ordering process.
Preferences are above for pair wise comparisons and from this the ordering of the membership
is done.
The angular fuzzy sets are different from the standard fuzzy sets in their coordinate
description. These sets are defined on the universe of angles, hence are repeating shapes
every 2 cycles. Angular fuzzy sets are applied in quantitative description of linguistic
variables known truth-values. When membership of value 1 is true and that of 0 is false, then
in between 0 and 1 is partially true or partially false.
Neural Networks
The fuzzy membership function may be created for fuzzy classes of an input data set.
For a given problem the number of input data values is selected. Then the data is divided into
training data set and testing data set. The training data set is used to train the network. After
full training and testing process is completed, the neural network is ready and it can be used
to determine the membership values of any input data in the different regions.
Genetic Algorithm
Genetic algorithm (GA) uses the concept of Darwins theory of evolution. Darwins
theory is based on the rule, survival of the fittest.
Inductive Reasoning
Formation of Rules
For any linguistic variable, there are three general forms in which the canonical rules
can be formed.
(1) Assignment statements
(2) Conditional statements
(3) Unconditional statements
Assignment statements
These statements are those in which the variable is assignment with the value. The
variable and the value assigned are combined by the assignment operator =. The
assignment statements are necessary in forming fuzzy rules. The value to be assigned may be
a linguistic term.
The assignment statement is found to restrict the value of a variable to a specific
equality.
Conditional statements
In these statements, some specific conditions are mentioned; if the conditions are
satisfied then it enters the following statements, called as restrictions.
Unconditional statements
There is no specific condition that has to be satisfied in this form of statements.
In the field of artificial intelligence (machine intelligence), there are various ways to
represent knowledge. Perhaps the most common way to represent human knowledge is to
form it into natural language expressions of the type
IF premise (antecedent), THEN conclusion (consequent).
The form in Expression given in above statement is commonly referred to as the IF
THEN rule-based form; this form is generally referred to as the deductive form. It typically
expresses an inference such that if we know a fact (premise, hypothesis, antecedent), then we
can infer, or derive, another fact called a conclusion (consequent).
This form of knowledge representation, characterized as shallow knowledge, is quite
appropriate in the context of linguistics because it expresses human empirical and heuristic
knowledge in our own language of communication.
It does not, however, capture the deeper forms of knowledge usually associated with
intuition, structure, function, and behavior of the objects around us simply because these
latter forms of know ledge are not readily reduced to linguistic phrases or representations;
The fuzzy rule-based system is most useful in modeling some complex systems that can
be observed by humans because they make use of linguistic variables as their antecedents and
consequents; as described her e these linguistic variables can be naturally represented by
fuzzy sets and logical connectives of these sets.
Defuzzification
Defuzzification means the fuzzy to crisp conversions. The fuzzy results generated
cannot be used as such to the applications, hence it is necessary to convert the fuzzy
quantities into crisp quantities for further processing.
This can be achieved by using defuzzification process. The defuzzification has the
capability to reduce a fuzzy to a crisp single-valued quantity or as a set, or converting to the
form in which fuzzy quantity is present.
Defuzzification can also be called as rounding off method. Defuzzification reduces the
collection of membership function values in to a single sealer quantity.
Defuzzification of fuzzy sets is done with the help of Lambda Cuts for Fuzzy Sets.
Consider a fuzzy set , then the lambda cut set can be denoted by A, where ranges
between 0 and 1 (0 1). The set A is going to be a crisp set. This crisp set is called the
lambda cut set of the fuzzy set , where
The value of lambda cut set is x, when the membership value corresponding to x is
greater that or equal to the specified . This lambda cut set can also be called as alpha cut set.
Lambda ranges in the interval [0, 1].
Defuzzification methods
There are seven methods used for defuzzifying the fuzzy output functions.
They are:
1. Max-membership principle,
2. Centroid method,
3. Weighted average method,
4. Meanmax membership,
5. Centre of sums,
6. Centre of largest area, and
7. First of maxima or last of maxima
Max-membership-principle
Centroid method
This is the most widely used method. This can be called as center of gravity or center of
area method. It can be defined by the algebraic expression is used for algebraic integration.
Weighting each membership function in the obtained output by its largest membership
value forms this method. This method cannot be used for asymmetrical output membership
functions, can be used only for symmetrical output membership functions.
The evaluation expression for this method is
Meanmax-membership
This method is related to max-membership principle, but the present of the maximum
membership need not be unique, i.e., the maximum membership need not be a single point, it
can be a range. This method is also called as middle of maxima method the expression is
given as
Centre of sums
It involves the algebraic sum of individual output fuzzy sets. The intersecting areas of the
fuzzy are added twice.
The defuzzified value z is given as
If the fuzzy set has two convex sub regions, then the entire of gravity of the convex sub
region with the largest area can be used to calculate the defuzzification value. The equation is
given as
Where cm is the convex region with largest area. The value z is same as the value zobtained
by centroid method. This can be done even for non-convex regions.
1. Write the mathematical expression of the membership function and sketch of the
membership function.
Membership function describes the information contained in a fuzzy set and is useful to
develop a lexicon of terms to describe various special features of this function.
For purposes of simplicity, the functions shown in the figures will all be continuous, but
the terms apply equally for both discrete and continuous fuzzy sets.
The sketch of a membership function consists of 3 regions
4. Core
5. Support
6. Boundary
Core
The core of a membership function for
some fuzzy set is defined as that region of
the universe that is characterized by
complete and full membership in the set
.That is, the core comprises those
elements x of the universe such that
( )
Support
Boundaries
The boundaries of a membership function for some fuzzy set are defined as that
region of the universe containing elements that have a nonzero membership but not complete
membership.
The boundaries comprise those elements x of the universe such that ( )
These elements of the universe are those with some degree of fuzziness, or only partial
membership in the fuzzy set .
Fuzzy sets follow the same properties as crisp sets. Because of this fact and because the
membership values of a crisp set are a subset of the interval [0, 1], classical sets can be
thought of as a special case of fuzzy sets.
The properties of fuzzy sets are
( ) ( )
( ) ( )
( )( ) ( ) ( )
( )( ) ( ) ( )( )
( )( ) ( )( )( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
The most appropriate properties for defining classical sets and showing their similarity
to fuzzy sets are:
Commutativity AB=BA
AB=BA.
Associativity A (B C ) = (A B) C
A (B C ) = (A B) C.
Distributivity A (B C ) = (A B) (A C)
A (B C ) = (A B) (A C).
Idempotency AA=A
A A = A.
Identity A=A
AX=A
A = .
AX=X.
Transitivity If A B and B C , then A C.
Involution = A.
Two special properties of set operations are known as the excluded middle axioms and
De Morgans principles. These properties are enumerated here for two sets A and B.
The excluded middle axioms are very important because these are the only set
operations that are not valid for both classical sets and fuzzy sets.
The first, called the axiom of the excluded middle, deals with the union of a set A and
its complement;
A =X
The second, called the axiom of contradiction, represents the intersection of a set A and
its complement.
A =
Classical (crisp) relations structures are the relations or structures that represent the
presence or absence of correlation, interaction, or propinquity between the elements of two or
more crisp sets.
There are only two degrees of relationship between elements of the sets in a crisp
relation: the relationships completely related and not related, in a binary sense.
Fuzzy relations are then developed by allowing the relationship between elements of
two or more sets to take on an infinite number of degrees of relationship between the
extremes of completely related and not related.
Fuzzy relations are to crisp relations as fuzzy sets are to crisp sets; crisp sets and
relations are constrained realizations of fuzzy sets and relations.
Operations, properties, and cardinality of fuzzy relations are Cartesian products and
compositions of fuzzy relations.
Let R be a relation that relates, or maps, elements from universe X to universe Y, and
let S be a relation that relates, or maps, elements from universe Y to universe Z. A useful
question we seek to answer is whether we can find a relation, T, that relate the same
elements in universe X that R contains to the same elements in universe Z that S contains. It
turns out that we can find such a relation using an operation known as composition.
From the Sagittal diagram in Figure, we see that the only path between relation R
and relation S is the two routes that start at x1 and end at z2(i.e., x1 y1 z2 and x1 y3
z2). Hence, we wish to find a relation T that relates the ordered pair (x1,z2), that is, (x1,z2)
T.
In this example, R ={(x1, y1), (x1, y3), (x2, y4)} . S ={(y1, z2), (y3, z2)} .
The max min composition is defined by the set-theoretic and membership function-
theoretic expressions
Uncertainty