Soft Computing PDF
Soft Computing PDF
◆ The idea of soft computing was initiated in 1981 when Lotfi A. Zadeh published his first
paper on soft data analysis “What is Soft Computing”, Soft Computing. Springer-Verlag
Germany/USA 1997.].
◆ DDE
Slides for Fuzzy Sets, Ch. 2 of
Neuro-Fuzzy and Soft Computing
J.-S. Roger Jang (張智星)
CS Dept., Tsing Hua Univ., Taiwan
http://www.cs.nthu.edu.tw/~jang
[email protected]
1) Soft Computing
Soft computing and hard computing are computing methods where hard computing is the conventional
methodology relies on the principles of accuracy, certainty, and inflexibility. Conversely, soft
computing is a modern approach premised on the idea of the approximation, uncertainty, and flexibility
Soft computing deals with approximate models and gives solutions to complex real-world problems. Soft computing is
an approach that gives an impression on the human mind to reason and learns in an environment of uncertainty and
impression.
•Soft computing deals with imprecision, uncertainty, partial truth and approximation to achieve close resemblance with
human decisions.
•The cost of the solution also very low in this kind of computing, it forms the basis of a considerable amount of machine
learning techniques.
Components of soft computing are as follows:
Machine learning, neural network, fuzzy logic, perception, genetic algorithms, etc.
2) Hard Computing
•Hard computing is suitable for mathematical problems, although it might be used to solve real-world
problems, it consumes a large amount of computation time and cost. So, in this case, soft computing is
a better alternative as compared to hard computing.
•Applications of hard computing are mobile robot coordination and forecasting combinational
problems.
•If we want to solve the deterministic problems, we can use a hard computing approach. As the
problem grows in size and complexity, the design search space also increases.
Conventional Computing vs. Intelligent Computing
Artificial intelligence is the intelligence exhibited by machines or software. It is also an academic field
of study. Major AI researchers and textbooks define the field as "the study and design of intelligent
agents", where an intelligent agent is a system that perceives its environment and takes actions that
maximize its chances of success.
Computational Intelligence:
Differences
Classifiers make use of pattern recognition for condition matching. In many cases this does not imply
absolute, but rather the closest match. Techniques to achieve this divide roughly into two schools of
thought: Conventional AI and Computational intelligence (CI).
Conventional Computing vs. Intelligent Computing
Conventional AI research focuses on attempts to mimic human intelligence through symbol manipulation and
symbolically structured knowledge bases. This approach limits the situations to which conventional AI can be
applied. Lotfi Zadeh stated that "we are also in possession of computational tools which are far more effective
in the conception and design of intelligent systems than the predicate-logic-based methods which form the
core of traditional AI." These techniques, which include fuzzy logic, have become known as soft computing.
These often biologically inspired methods stand in contrast to conventional AI and compensate for the
shortcomings of symbolicism. These two methodologies have also been labeled as neats vs. scruffies, with
neats emphasizing the use of logic and formal representation of knowledge while scruffies take an
application-oriented heuristic bottom-up approach.
1. Intelligent computing does not guarantee a solution to a given problem. Conventional computing
guarantees a solution to a given problem.
2. In intelligent computing, results may not be reliable and consistent. In conventional computing,
results are consistent and reliable.
3. In intelligent computing, a programmer does not tell the system how to solve the given problem. In
conventional computing, programmer tells the system exactly how to solve the problem.
4. Intelligent computing can solve a range of problems in a given domain. Conventional computing
can solve only one problem at a time in a given domain.
• The notion of artificial intelligence in computing started with attempts at
replicating the human ways of reasoning in computing.
To classify a device as “intelligent,” it should necessarily satisfy the following
requirements:-
1. Learning/adapting: It should be able to learn from the environment it is
working in.
2. 2. Decision making/classification: It should be able to make decisions
relevant to the environment it is deployed in, on new and unknown inputs.
Necessity of Intelligent Computing
What is computational intelligence all about?
• Other problems may be easily formulated, but all algorithms solving them
may be NP hard, requiring almost infinite amount of computations to
solve complex cases.
• Perception: recognition of signals, phoneme recognition, olfactory(smell) signals – first step in robotics.
• Visual perception: face recognition, object recognition and many computer vision problems.
• Control and planning problems in robotics and control of non-linear complex systems with many degrees
of freedom.
• Medical diagnostics, interpretation of medical images and biomedical signals (EEG, ECG ...), therapy
planning.
-Although, classical sets are suitable for the various applications and have been proven to be an important tool for
mathematics and computer science, they do not reflect the nature of the human concepts and thoughts, which tends to
be abstract and imprecise.
-e.g the set of tall persons as a collection of persons whose height is more than 6 feet ; if we let
A=“tall person” and x = “height”
It classify a person 6.001 ft tall as a tall person, but not a person 5.999 ft tall. This distinction is intuitively unreasonable.
-In contrast to a classical set, a fussy set , as name implies is a set without a crisp boundary.
-Transition from “belong to a set ” to “not belong to a set” is gradual, and this smooth transition is characterized by MFs.
-MFs give fuzzy sets flexibility in modelling commonly used linguistic expressions, such as “ the water is hot” or “the
temperature is high”
Fuzzy sets
Fuzzy sets and membership function:
If X is a collection of objects denoted generally by x, then a fuzzy set A in X is defined as a set of ordered pairs:
A = (𝑥, 𝜇𝐴 𝑥 ) 𝑥 ∈ 𝑋
Where, 𝜇𝐴 𝑥 is MF that is between 0 and 1.
Let X = 𝑃𝑎𝑡𝑛𝑎, 𝑅𝑎𝑛𝑐ℎ𝑖, 𝐵𝑜𝑘𝑎𝑟𝑜, 𝐷ℎ𝑎𝑛𝑏𝑎𝑑 be the set of cities one may wish to live in. the fuzzy set C=
‘desirable city to live in ‘ described as
C = 𝑃𝑎𝑡𝑛𝑎, 0.6 , 𝑅𝑎𝑛𝑐ℎ𝑖, 0.9 , (𝐵𝑜𝑘𝑎𝑟𝑜, 0.7), (𝐷ℎ𝑎𝑛𝑏𝑎𝑑, 0.5)
Alternative expression:
C=0.6/Patna+0.9/Ranchi+0.7/Bokaro+0.5/Dhanbad
Crossover points:
A crossover point of a fuzzy set A is a point 𝑥 ∈ 𝑋 at which 𝜇𝐴 𝑥 = 0.5
crossover(A) = 𝑥 𝜇𝐴 𝑥 = 0.5
Fuzzy singleton:
A fuzzy set whose support is a single point in 𝑋 with 𝜇𝐴 𝑥 = 1 is called a
fuzzy singleton.
Fuzzy Sets
σ-cut:
The σ-cut or σ-level of a fuzzy set A is a crisp set defined by
𝐴σ = 𝑥 𝜇𝐴 𝑥 ≥ σ
Strong σ-cut or strong σ-level set are defined similarly:
𝐴′σ = 𝑥 𝜇𝐴 𝑥 > σ
Using the notation for a level set, we can express the support and core of a fuzzy set A as
Support(A) = 𝐴′0 and
Core(A)=𝐴1 , respectively
Convexity
A fuzzy set A is convex if and only if for any 𝑥1 𝑥2 ∈ 𝑋 and any 𝝀 ∈ [0,1]
• Figure below illustrates the concept of convexity of fuzzy sets; Figure (a) shows two convex fuzzy sets, the
left fuzzy set satisfies both Equations, while the right one satisfies Equation 1 only. Figure (b) is a
nonconvex fuzzy set.
Fuzzy numbers
• A fuzzy number A is a fuzzy set in the real line (R) that satisfies the conditions for normality and
convexity.
• Most (non-composite) fuzzy sets used in the literature satisfy the conditions for normality and
convexity, so fuzzy numbers are the most basic type of fuzzy sets.
width(A) = | x2 - x1 |
where μA(x1) = μA(x2) = 0.5.
Symmetry
A fuzzy set A is symmetric if its MFs is symmetric around a certain point x = c, namely,
A fuzzy set A is
open left if
limx→-∞μA(x) = 1 and limx→+∞μA(x) = 0;
open right if
limx→-∞μA(x) = 0 and limx→+∞μA(x) = 1;
closed if
limx→-∞μA(x) = limx→+∞μA(x) = 0;
For example, the fuzzy set "young" is open left; "old" is open right; and "middle aged" is closed.
Set theory operations
Union, intersection and complement
• The main features of operation on fuzzy set are that unlike conventional sets, operations on fuzzy sets are usually
described with reference to membership function. When I say operation, I do not do with the member itself, but I
manipulate. When I say operation, I manipulate the membership of the members in a set; members are not
manipulated, rather the membership function of the member is manipulated. This is very important; that is, x and
μ( x). In classical set what is manipulated is x.
• If I say, x is 1 In classical set when I say x is 1 then, I would say 1 minus x is 0. In this, the manipulation concerns with
the member; whereas any kind of manipulation in fuzzy set does not involve with x; rather it involves μx.
• Containment or subset:
• Three common operations: intersection which we say is the minimum function, union, which
we say is the maximum function and then fuzzy complementation
Standard fuzzy operations:
Intersection(Conjunction)or T-norm:
We can easily see that, the membership of A (green) intersection B(red) in fig. is all the members that belongs to,
that is common between A and B. Their membership will follow these (blue) curves. There are two things we are
doing. We have 2 sets. One is set A and the other is set B. Classically, what we see is the common members
between A and B. We are not only seeing the common members, here we are also seeing, what is their
membership function.
That is the meaning of these two curves that we have and then we are trying to find out what the fuzzy union is. I have to
find out In this the members are both belonging to A and B. But their membership is maximum of both. if I have common
members. I have set A and I have set B; A union B is my union set. If x belongs to A and x belongs to B, then x also belongs
to A union B. But in fuzzy set, here this is μ A x and here it is μ x and in this case, this is maximum of μA x and μB x; the
membership function. That is the way it is assigned.
This candidate, when it comes to A union B take these two values of membership, find the maximum which is 0.1 and
assign here, which is 0.1. This is, μ union B is 0.1. This is the meaning. This is a very important operation that we do. When
we have two different fuzzy sets, the operations are classical. The manipulation is among the membership functions;
otherwise, the notion of the classical fuzzy operation also remains intact, except that the associated fuzzy membership
gets changed.
Complement(Negation):
now it is fuzzy complementation. What is complement? This one, this particular triangular function is my set R(red); fuzzy
set R. The complement is like this; just inverse (blue). What is 1 minus μA x; meaning 1 minus μA x.
Fig. Complement of fuzzy set
What is seen that the members remain intact in the set A, whereas the associated membership functions got changed.
The other operations that we know for classical sets like De Morgan’s law, the difference also can be used for the sets
like De Morgan’s law.
They are commutative. A union B is B union A; A intersection B is B intersection A. It is like classical sets; fuzzy sets
equally hold.
Associativity; A union B union C is A union B union C. Similarly, A union bracket B union C is A intersection B
intersection C is A intersection B combined with intersection C.
Hedges :
Another important feature of fuzzy systems is the ability to define "hedges," or modifier of fuzzy values. These
operations are provided in an effort to maintain close ties to natural language, and to allow for the generation of fuzzy
statements through mathematical calculations. As such, the initial definition of hedges and operations upon them will
be quite a subjective process and may vary from one project to another. Nonetheless, the system ultimately derived
operates with the same formality as classic logic. The simplest example is in which one transforms the statement
"Jane is old" to "Jane is very old."
μ"very"A(x) = μA(x)^2
Other common hedges are "more or less" [typically SQRT(μA(x))], "somewhat," "rather," "sort of," and so on. Again,
their definition is entirely subjective, but their operation is consistent: they serve to transform membership/truth
values in a systematic manner according to standard mathematical functions.
Cartesian Product & Co-product:
Let A & B be fuzzy sets in X & Y respectively, then Cartesian product of A & B is a
fuzzy set in the product space XxY with the membership function
• The classes of parameterized functions commonly used to define MFs of one and two dimensions.
• MFs of higher dimensions can be defined similarly. Moreover, we give the derivatives of some of the
MFs with respective to their inputs and parameters.
• These derivatives are important for fine-tuning a fuzzy inference system to achieve a desired
input/output mapping.
• By using min and max, we have an alternative expression for the preceding equation:
𝑥−𝑎 𝑐−𝑥
𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒 𝑥; 𝑎, 𝑏, 𝑐 = 𝑚𝑎𝑥 𝑚𝑖𝑛 , ,0
𝑏−𝑎 𝑐−𝑏
• The parameters 𝑎, 𝑏, 𝑐 (with a<b<c) determine the x coordinates of the three corners of the
underlying triangular MF.
#Trapezoidal MFs:
A Trapezoidal MF is specified by four parameters 𝑎, 𝑏, 𝑐, 𝑑 as follows:
An alternative concise expression using min and max is
x−a c−x
trimf ( x; a, b, c) = max min , ,0
Triangular MF: b − a c − b
x−a d−x
trapmf ( x; a, b, c, d ) = max min ,1, ,0
Trapezoidal MF: b−a d −c
Due to their simple formulas and computational efficiency both triangular MF and trapezoidal MF have
been used extensively, especially in real time implementations. However since MF are composed of
straight line segments, they are not smooth at the corner points specified by parameters. Other smooth
and non-linear functions are defined
2
1 x −c
−
Gaussian MF: gaussmf ( x; c, ) = e 2
1
gbellmf ( x; a, b, c) =
Generalized bell MF: x−c
2b
1+
a
(a) Triangulation (x;20,60,80) (b)trapezoidal(x;10,20,60,95) (c ) gaussian(x;50,20) (d)bell(x;20,4,50)
Figure: Physical meaning of parameters in generalized bell MF
Sigmoidal MF: Where a control the slope at the
cross over point x=c, and
right/left
Product
of two sig. MFs
c=25
c=65 a=10
a=60 b=40
b=10
#MFs of two dimensions
Where, S > -1