Applied Ai U2
Applied Ai U2
1-Probability Theory:
Probability
Probability implies 'likelihood' or 'chance'. When an event is certain to happen then the
probability of occurrence of that event is 1 and when it is certain that the event cannot
happen then the probability of that event is 0.
Formula
P(A)=(Number of favourable cases / Total number of equally likely cases)=m/n
Thus to calculate the probability we need information on number of favorable cases and total
number of equally likely cases. This can he explained using following example.
Example
Problem Statement:
Solution:
P(head)=1/2 = 0.5
Joint probability is a statistical measure that calculates the likelihood of two events
occurring together and at the same point in time.
Joint probability is the probability of event Y occurring at the same time that event X
occurs.
Conditional Probability
The conditional probability of an event B is the probability that the event will occur
given the knowledge that an event A has already occurred.
This probability is written P(B|A), notation for the probability of B given A.
In the case where events A and B are independent (where event A has no effect on the
probability of event B), the conditional probability of event B given event A is simply the
probability of event B, that is P(B).
From this definition, the conditional probability P(B|A) is easily obtained by dividing by P(A):
So the next event depends on what happened in the previous event, and is called dependent.
Bayes’s theorem
In statistics and probability theory, the Bayes’ theorem (also known as the Bayes’ rule) is
a mathematical formula used to determine the conditional probability of events.
Essentially, the Bayes’ theorem describes the probability of an event based on prior
knowledge of the conditions that might be relevant to the event.
Example:
Imagine 100 people at a party, and you tally how many wear pink or not, and if a man or not, and
get these numbers:
P(Man) = 0.4,
P(Pink) = 0.25 and
P(Pink|Man) = 0.125
Cumulative Probability
A cumulative probability refers to the probability that the value of a random variable falls
within a specified range.
Frequently, cumulative probabilities refer to the probability that a random variable is less
than or equal to a specified value.
Consider a coin flip experiment. If we flip a coin two times, we might ask: What is the
probability that the coin flips would result in one or fewer heads? The answer would be a
cumulative probability.
It would be the probability that the coin flip results in zero heads plus the probability that
the coin flip results in one head. Thus, the cumulative probability would equal:
The table below shows both the probabilities and the cumulative probabilities associated with
this experiment.
0 0.25 0.25
1 0.50 0.75
2 0.25 1.00
The idea of fuzzy logic was first advanced by Dr. Lotfi Zadeh of the
University of California at Berkeley in the 1960s.
Fuzzy logic has been used in numerous applications such as facial pattern
recognition, air conditioners, washing machines, vacuum cleaners, antiskid
braking systems, transmission systems, control of subway systems and
unmanned helicopters, knowledge-based systems for multi objective
optimization of power systems
.
Fuzzy logic contains the multiple logical values and these values are the truth values of a
variable or problem between 0 and 1. This concept was introduced by Lofti Zadeh in
1965 based on the Fuzzy Set Theory.
In the Boolean system, only two possibilities (0 and 1) exist, where 1 denotes the
absolute truth value and 0 denotes the absolute false value. But in the fuzzy system, there
are multiple possibilities present between the 0 and 1, which are partially false and
partially true.
The Fuzzy logic can be implemented in systems such as micro-controllers, workstation-
based or large network-based systems for achieving the definite output. It can also be
implemented in both hardware or software.
1. This concept is flexible and we can easily understand and implement it.
2. It is used for helping the minimization of the logics created by the human.
3. It is the best method for finding the solution of those problems which are suitable for
approximate or uncertain reasoning.
4. It always offers two values, which denote the two possible solutions for a problem and
statement.
In the architecture of the Fuzzy Logic system, each component plays an important role. The
architecture consists of the different four components which are given below.
1. Rule Base
2. Fuzzification
3. Inference Engine
4. Defuzzification
Rule Base is a component used for storing the set of rules and the If-Then conditions given by
the experts are used for controlling the decision-making systems. There are so many updates that
come in the Fuzzy theory recently, which offers effective methods for designing and tuning of
fuzzy controllers. These updates or developments decreases the number of fuzzy set of rules.
2. Fuzzification
Fuzzification is a module or component for transforming the system inputs, i.e., it converts the
crisp number into fuzzy steps. The crisp numbers are those inputs which are measured by the
sensors and then fuzzification passed them into the control systems for further processing. This
component divides the input signals into following five states in any Fuzzy Logic system:
3. Inference Engine
This component is a main component in any Fuzzy Logic system (FLS), because all the
information is processed in the Inference Engine. It allows users to find the matching degree
between the current fuzzy input and the rules. After the matching degree, this system determines
which rule is to be added according to the given input field. When all rules are fired, then they
are combined for developing the control actions.
4. Defuzzification
Defuzzification is a module or component, which takes the fuzzy set inputs generated by
the Inference Engine, and then transforms them into a crisp value. It is the last step in the
process of a fuzzy logic system. The crisp value is a type of value which is acceptable by the
user. Various techniques are present to do this, but the user has to select the best one for reducing
the errors.
Set
A set is a term, which is a collection of unordered or ordered elements. Following are the various
examples of a set:
Classical Set
It is a type of set which collects the distinct objects in a group. The sets with the crisp boundaries
are classical sets. In any set, each single entity is called an element or member of that set.
Any set can be easily denoted in the following two different ways:
1. Roaster Form: This is also called as a tabular form. In this form, the set is represented in the
following way:
The elements in the set are enclosed within the brackets and separated by the commas.
Following are the two examples which describes the set in Roaster or Tabular form:
Example 1:
Example 2:
Set of Prime Numbers less than 50: X={2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}.
Fuzzy Set
Given à and B are the two fuzzy sets, and X be the universe of discourse with the following
respective member functions:
Example:
then,
For X1
For X2
For X3
For X4
2. Intersection Operation:
Example:
then,
For X1
For X2
For X3
For X4
3. Complement Operation:
μĀ(x) = 1-μA(x),
Example:
then,
μĀ(X1) = 1-μA(X1)
μĀ(X1) = 1 - 0.3
μĀ(X1) = 0.7
For X2
μĀ(X2) = 1-μA(X2)
μĀ(X2) = 1 - 0.8
μĀ(X2) = 0.2
For X3
μĀ(X3) = 1-μA(X3)
μĀ(X3) = 1 - 0.5
μĀ(X3) = 0.5
For X4
μĀ(X4) = 1-μA(X4)
μĀ(X4) = 1 - 0.1
μĀ(X4) = 0.9
`
Following are the different application areas where the Fuzzy Logic concept is widely used:
Fuzzy Logic has various advantages or benefits. Some of them are as follows:
Fuzzy Logic has various disadvantages or limitations. Some of them are as follows:
1. The run time of fuzzy logic systems is slow and takes a long time to produce outputs.
2. Users can understand it easily if they are simple.
Membership Function
The membership function is a function which represents the graph of fuzzy sets, and
allows users to quantify the linguistic term. It is a graph which is used for mapping each
element of x to the value between 0 and 1.
This function is also known as indicator or characteristics function.
This function of Membership was introduced in the first papers of fuzzy set by Zadeh.
For the Fuzzy set B, the membership function for X is defined as:
μB:X → [0,1].
In this function X, each element of set B is mapped to the value between 0 and 1. This is
called a degree of membership or membership value.
Membership function (MF) - A function that specifies the degree to which a given input belongs to a set.
Degree of membership- The output of a membership function, this value is always limited to between 0
and 1. Also known as a membership value or membership grade.
Membership functions are used in the fuzzification and defuzzification steps of a FLS (fuzzy logic
system), to map the non-fuzzy input values to fuzzy linguistic terms and vice versa.
Fuzzy singleton- A fuzzy set with a membership function that is unity at a one particular point and zero
everywhere else.
Triangular MFs
A triangular MF is specified by three parameters {a, b, c} as follows:
By using min and max, we have an alternative expression for the preceding equation:
A membership function (MF) is a curve that defines how each point in the input space is
mapped to a membership value (or degree of membership) between 0 and 1. The input space is
sometimes referred to as the universe of discourse.
The only condition a membership function must really satisfy is that it must
vary between 0 and 1.
Core
For any fuzzy set A˜, the core of a membership function is that region of universe that is
characterize by full membership in the set. Hence, core consists of all those elements y of the
universe of information such that,
μA˜(y)=1
Support
For any fuzzy set A˜, the support of a membership function is the region of universe that is
characterize by a nonzero membership in the set. Hence core consists of all those elements y of
the universe of information such that,
μA˜(y)>0
Boundary
For any fuzzy set A˜, the boundary of a membership function is the region of universe that is
characterized by a nonzero but incomplete membership in the set. Hence, core consists of all
those elements y of the universe of information such that,
1>μA˜(y)>0
Problem No.1
The elements in two sets A and Bare given as A={2,4} and B= {a,b,c) Find the various
Cartesian products of these two sets.
Find AXB=? BXA=? AXA=? BXB=?
Solution:.'I'he various Cartesian products of these two given sets are
A X B = {(2, a). (2. b), (2, c), (4, a), (4, b), (4, c)}
B x A = {(a, 2), (a, 4), (b, 2), (b, 4), (c, 2), (c, 4))
Ax A = A2 = { ((2,2), (2,4). (4,2), (4.4)}
BXB = B2 = {(a,a),(a,b),(a,c),(b,b),(b,a),(b,c),(c,c),(c,a),(c,b)};
This universe of discourse in a concrete case has to be chosen according to the speci¯c
situation of this case.
Obviously, for each usual, i.e. crisp set M its usual characteristic function
such a membership function. Therefore we consider crisp sets as special cases of fuzzy
sets, viz. those ones with only 0 and 1 as membership degrees. Fuzzy sets A;B are equal
if they have the same membership functions:
We use IF(X) to denote the class of all fuzzy subsets of the universe of discourse X.
If one intends to describe some fixed fuzzy set A over the universe of discourse X then
one defines its membership function either by giving some formula to describe
, or by a table of the values, or by a picture of the graph of .
Using a table for this purpose is especially useful for finite universes of discourse X. E.g.
for X0 = {a1; a2; : : : ; a6} the table
C : a1 a2 a3 a4 a5 a6
0:3 0:7 0:9 0:6 0 0:2
describes a fuzzy set C with C(a2) = 0:7 and C(a6) = 0:2. In the case that one has a
natural ordering for the elements of the universe X.