Neural Network & Fuzzy Logic SRM
Neural Network & Fuzzy Logic SRM
Introduction
Neural Networks
0 0 0 1 0 0 0
adjustable
weights
1 20 37 10 1 1
Neural Networks
4.07.12
Neural Networks
Biological Analogy
Neural Networks
Perceptrons
Output of unit j:
Output oj = f(aj)
units j
Input to unit i: ai
measured value of variable i
i
Input units
Neural Networks
Input
units
Cough Headache
Δ rule
change weights to
weights decrease the error
what we got
No disease Pneumonia Flu Meningitis
- what we wanted
error
Output units
Neural Networks
Linear Separation
Neural Networks
Nonlinear Separation
Linear Nonlinear
Activation Activation
Neural Networks
Multilayered Perceptrons
Neural Networks
adjustable
weights
1 20 37 10 1 1
Jargon Pseudo‐Correspondence
• Independent variable = input variable
• Dependent variable = output variable
• Coefficients = “weights”
• Estimates = “targets”
• Cycles = epoch
Neural Networks
Dependent
Independent Coefficients variable
variables
a, b, c Prediction
x1, x2, x3
Neural Networks
Output
Input Weights Hidden Weights variable
variables Layer
Prediction
Neural Networks
negative derivative
• Cross Entropy Error
(for dichotomous or
binary outcomes)
final error ‐ Σ(t ln o) + (1‐t) ln (1‐o)
local minimum
Implementation of Learning:
Gradient descent & Minima
Error
Global minimum
Local minimum
Epochs
Neural Networks
error
holdout
training
0 age epochs
Neural Networks
Overfitted model
Parameter Estimation
Logistic Regression Neural Network
• It models just one function • It models several functions
– Maximum likelihood – Backpropagation
– Fast – Iterative
– Optimizations – Slow
• Fisher – Optimizations
• Newton‐Raphson • Quickprop
• Scaled conjugate g.d.
• Adaptive learning rate
Neural Networks
Model Selection:
Finding Influential Variables
Logistic Neural Network
• Forward • Weight elimination
• Backward • Automatic Relevance
Determination
• Stepwise
• “Relevance”
• Arbitrary
• All combinations
• Relative risk
Neural Networks
Regression Diagnostics:
Finding Influential Observations
“Unbiased” Evaluation:
Training and Tests Sets
• Training set is used to build the model (may include holdout set to control
for overfitting)
• Test set left aside for evaluation purposes
• Ideal: yet another validation data set, from different source to test if
model generalizes to other settings
Neural Networks
Evaluation of NN
Neural Networks
Definition
• Experts rely on common sense when they solve problems.
• How can we represent expert knowledge that uses vague and ambiguous
terms in a computer?
• Fuzzy logic is not logic that is fuzzy, but logic that is used to describe
fuzziness. Fuzzy logic is the theory of fuzzy sets, sets that calibrate
vagueness.
• Fuzzy logic is based on the idea that all things admit of degrees.
Temperature, height, speed, distance, beauty – all come on a sliding scale.
– The motor is running really hot.
– Tom is a very tall guy.
Fuzzy Logic
Definition
• Many decision‐making and problem‐solving tasks are too complex to be
understood quantitatively, however, people succeed by using knowledge
that is imprecise rather than precise.
• Fuzzy set theory resembles human reasoning in its use of approximate
information and uncertainty to generate decisions.
• It was specifically designed to mathematically represent uncertainty and
vagueness and provide formalized tools for dealing with the imprecision
intrinsic to many engineering and decision problems in a more natural
way.
• Boolean logic uses sharp distinctions. It forces us to draw lines between
members of a class and non‐members. For instance, we may say, Tom is
tall because his height is 181 cm. If we drew a line at 180 cm, we would
find that David, who is 179 cm, is small.
• Is David really a small man or we have just drawn an arbitrary line in the
sand?
Fuzzy Logic
Bit of History
• Fuzzy, or multi‐valued logic, was introduced in the 1930s by Jan
Lukasiewicz, a Polish philosopher. While classical logic operates with only
two values 1 (true) and 0 (false), Lukasiewicz introduced logic that
extended the range of truth values to all real numbers in the interval
between 0 and 1.
• For example, the possibility that a man 181 cm tall is really tall might be
set to a value of 0.86. It is likely that the man is tall. This work led to an
inexact reasoning technique often called possibility theory.
• In 1965 Lotfi Zadeh, published his famous paper “Fuzzy sets”. Zadeh
extended the work on possibility theory into a formal system of
mathematical logic, and introduced a new concept for applying natural
language terms. This new logic for representing and manipulating fuzzy
terms was called fuzzy logic.
Fuzzy Logic
Fuzzy Applications
• Theory of fuzzy sets and fuzzy logic has been applied to problems in a
variety of fields:
– taxonomy; topology; linguistics; logic; automata theory; game theory;
pattern recognition; medicine; law; decision support; Information
retrieval; etc.
Fuzzy Applications
Advertisement: …
• Extraklasse Washing Machine ‐ 1200 rpm. The Extraklasse machine has a
number of features which will make life easier for you.
• Fuzzy Logic detects the type and amount of laundry in the drum and allows
only as much water to enter the machine as is really needed for the loaded
amount. And less water will heat up quicker ‐ which means less energy
consumption.
• Foam detection
Too much foam is compensated by an additional rinse cycle: If Fuzzy Logic
detects the formation of too much foam in the rinsing spin cycle, it simply
activates an additional rinse cycle. Fantastic!
• Imbalance compensation
In the event of imbalance, Fuzzy Logic immediately calculates the maximum
possible speed, sets this speed and starts spinning. This provides optimum
utilization of the spinning time at full speed […]
• Washing without wasting ‐ with automatic water level adjustment
Fuzzy automatic water level adjustment adapts water and energy consumption
to the individual requirements of each wash programme, depending on the
amount of laundry and type of fabric […]
Fuzzy Logic
More Definitions
• Fuzzy logic is a set of mathematical principles for knowledge
representation based on degrees of membership.
Fuzzy Sets
universe of discourse
1.0
– the
range of all possible values
0.8
Tall Men
applicable to a chosen
0.6
According to this
0.0
150 160 170 180 190 200 210
representation, theDegree
universe
of
of Height, cm
corresponding membership
values.
Fuzzy Logic
IF project_duration is long
THEN completion_risk is high
IF speed is slow
THEN stopping_distance is short