Neural Networks
Neural Networks
Examples:
ØSpeech phoneme recognition
ØImage classification
ØFinancial prediction
Neural Networks
Ø Our brains, in average, contain 86 billion
neurons (nerve cells).
Ø A single neuron may receive one to multiple
inputs from other neurons and sending the
bio current to the corresponding output(s)
when the certain criteria are satisfied.
Ø Nowadays, the actual mechanism of how
human brain works is still a mystery.
Ø However, artificial neural network somehow
achieves learning by imitating the human brain
neuron behavior.
Descriptions
ØUse network of connected nodes (in layers)
ØNetwork connects input, output (categorical)
o inputs like independent variable values in regression
o outputs: {buy, don’t} {paid, didn’t}
{red, green, blue, purple}
{character recognition - alphabetic characters}
Artificial Neural Networks (ANN)
Input Layer Hidden Layers Output Layer
Good
Bad
Types of connectivity
ØFeedforward networks output units
o These compute a series of transformations
o Typically, the first layer is the input and the hidden units
last layer is the output.
ØRecurrent networks
input units
o These have directed cycles in their
connection graph. They can have
complicated dynamics.
o More biologically realistic.
Modelling a Neuron
ØAdjust the weights in such a way that the output of ANN is consistent
with class labels of training examples
E = å [Yi - f ( wi , X i )]
2
o Error function:
i
o Find the weights wi’s that minimize the above error function
• e.g., gradient descent, backpropagation algorithm
Optimizing concave/convex function
ØMaximum of a concave function = minimum of a convex
function
Gradient ascent (concave) / Gradient descent (convex)
è Back Propagation of Error: errors are computed from the last layer back to
the hidden layers
Perceptron
Problem Definition
Parameters (Coefficients)
Get back to the example
Get back to the example (2)
Non-linearly separable cases
Activation Functions
2-layer or
1-hidden layer
fully connected
network
Input Hidden Output
layer layer layer
ØMulti-layer feed-forward networks