Unit V
Unit V
1
UNIT V
NEURAL NETWORKS
Contents
• Perceptron - Multilayer perceptron, Activation functions,
network training
• Gradient descent optimization – stochastic gradient
descent,
• Error back propagation, from shallow networks to deep
networks
• Unit saturation (aka the vanishing gradient problem)
• ReLU, hyperparameter tuning
• batch normalization, regularization, dropout.
What is a Neural Network?
• Neural networks are machine learning models that mimic
the complex functions of the human brain.
• A neural network makes decisions in a manner similar to
the human brain, by using processes that mimic the way
biological neurons work together to identify phenomena,
weigh options and arrive at conclusions.
• These models consist of interconnected nodes or neurons
that process data, learn patterns, and enable tasks such as
pattern recognition and decision-making.
• Their ability to learn from vast amounts of data is
transformative, impacting technologies like natural
language processing, self-driving vehicles,
and automated decision-making.
● In neurons, the dendrite receives
electrical signals from the axons of
other neurons. while in the perceptron
these electrical signals are represented
as numerical values.
● At the synapses between the dendrite
and axons, electrical signals are
modulated in various amounts. This is
also modeled in the perceptron by
multiplying each input value by a value
called the weight.
● An actual neuron fires an output signal
only when the total strength of the
input signals exceed a certain
threshold. This phenomenon is
modeled in a perceptron by calculating
the weighted sum of the inputs to
represent the total strength of the input
signals, and applying a threshold
function on the sum to determine its
output.
Perceptron
• A perceptron is a single processing unit of a neural network.
• Associated with each input, Xj ∊ R, j = 1, ... , d, is a connection
weight, or synaptic weight Wj ∊ R, and the output, y, in the simplest
case is a weighted sum of the inputs
• A perceptron can be defined as a single artificial neuron that
computes its weighted input with the help of the threshold activation
functions.
• They are used for Binary Classification.
• Neural networks are capable of learning and identifying
patterns directly from data without pre-defined rules.
These networks are built from several key components:
• Neurons: The basic units that receive inputs, each neuron
is governed by a threshold and an activation function.
• Connections: Links between neurons that carry
information, regulated by weights and biases.
• Weights and Biases: These parameters determine the
strength and influence of connections.
• Propagation Functions: Mechanisms that help process
and transfer data across layers of neurons.
• Learning Rule: The method that adjusts weights and
biases over time to improve accuracy.
Learning in neural networks follows a structured,
three-stage process:
21
Cons
• Perceptron can only perform binary classification.
24
MULTI-LAYER PERCEPTRON
• Implementing AND, OR and NOT gates using single layer
perceptron is simple. But exclusive-OR cannot be
implemented due to its non-linear nature.
● Cost Function is a function that measures the performance of a model for any given
data. It quantifies the error between predicted values and expected values and presents
it in the form of a single real number.
● A common cost function for regression problems is the Mean Squared Error (MSE). It
calculates the average of the squared differences between predicted and actual values.
● In online learning, we do not write the error function over the whole sample but on
individual instances.
● Starting from
● random initial weights, at each iteration we adjust the parameters a little bit to minimize the
error, without forgetting what we have previously learned.
● If this error function is differentiable, we can use gradient descent.
● We descent through this error gradient till we reach the minima where the error is
minimum.