Lecture 13.3 Classification ANN
Lecture 13.3 Classification ANN
Contents
Neural Network
Neuron
Network Architecture
Backpropagation
Bayesian belief Network
Neural Networks
● Artificial neural network (ANN) is a machine learning approach that
models human brain and consists of a number of artificial neurons.
● Neuron in ANNs tend to have fewer connections than biological
neurons.
● Each neuron in ANN receives a number of inputs.
● An activation function is applied to these inputs which results in
activation level of neuron (output value of the neuron).
● Knowledge about the learning task is given in the form of examples
called training examples.
Neural Network (Cont….)
Activation
function
output
Weighted Sum
Bias
Inputs
Weights Figure:1 Basic Neuron Model
Neuron Models
● The choice of activation function determines the neuron model.
Examples:
0 if x
● step function: ( x)
1 if x
● sigmoid function 1
( x)
1 exp( x )
● Gaussian function:
1 1 x 2
( x) exp
2 2
Network Architectures
− single-layer feed-forward
− multi-layer feed-forward
− recurrent
Single Layer Feed-forward
Input Output
layer layer
Hidden Layer
3-4-2 Network
Training Algorithm: Backpropagation
● The Backpropagation algorithm learns in the same way as
single perceptron.
● It searches for weight values that minimize the total error of the
network over the set of training examples (training set).
● Backpropagation consists of the repeated application of the
following two passes:
− Forward pass: In this step, the network is activated on one
example and the error of (each neuron of) the output layer is
computed.
− Backward pass: in this step the network error is used for
updating the weights. The error is propagated backwards from
the output layer through the network layer by layer.
Backpropagation
Network activation
Forward Step
Error propagation
Backward Step
where Oj is the actual output of unit j, and Tj is the known target value
of the given training example.
The error of a hidden layer unit j is
where wjk is the weight of the connection from unit j to a unit k in the
next higher layer, and Errk is the error of unit k.
Backpropagation Algorithm (Cont…)
input
d hidden
output
d
A Bayesian Belief Network
C D
C D
B C P(C|B)
false false 0.4
false true 0.6
true false 0.9
true true 0.1 For a given combination of values of the parents
(B in this example), the entries for P(C=true | B)
and P(C=false | B) must add up to 1
eg. P(C=true | B=false) + P(C=false |B=false )=1
Properties
Two important properties:
Encodes the conditional independence relationships
between the variables in the graph structure
Is a compact representation of the joint probability
distribution over the variables
Conditional Independence
P1 P2
ND1 X ND2
C1 C2
The Joint Probability Distribution
n
P ( X 1 x1 ,..., X n xn ) P ( X i xi | Parents ( X i ))
i 1
Where Parents(Xi) means the values of the Parents of the node Xi with respect to the
graph
Using a Bayesian Network Example
C D
Using a Bayesian Network Example
B
These numbers are from the
conditional probability tables
C D
Inference