Neural Networks
Neural Networks
Neural Networks
The human brain is composed more than billion nerve cells called
neurons. They are connected to other thousand cells by Axons.
Stimuli from external environment or inputs from sensory organs
are accepted by dendrites. These inputs create electric impulses,
which quickly travel through the neural network. A neuron can then
send the message to other neuron to handle the issue or does not
send it forward.
Human Nervous System
Basically, a neuron receives signals from other neurons (dendrite), processes it
like the CPU (soma or cell body), passes the output through a cable like structure
(axon) to synapse (Point of connection to other neurons) to other neuron’s
dendrite.
Basic Structure of ANN
A neural network is composed of layers of interconnected nodes. The input layer
receives the raw input data, and the output layer produces the final prediction or
decision based on the computations performed by the hidden layers. The hidden
layers perform intermediate computations on the data and can vary in number
and size depending on the complexity of the task and the desired network
architecture.
Each link is associated with weight. ANNs are capable of learning, which takes
place by altering weight values. ANN is also known as a Feed-Forward Neural
Network (FNN) because inputs are processed only in the forward direction.
Biological Neuron vs Artificial Neuron
Parts of an artificial neuron
The neuron will receive input (x), which is usually a number or a vector
of numbers.
Each input is multiplied by a weight (w), which describes the strength of
the connection. The weights are learnable parameter (basically an
adjustable number that can be tuned to find an optimal output).
The bias (b) is a parameter that is associated with each node in a neural
network. It is used to adjust the output of the node, even when the
input is zero. The bias allows the model to fit the data better and make
more accurate predictions.
The Linear Function is the sum of the weighted input.
The output or the activation function (f) is used in the network to
introduce non-linearity into our model. This is done to make our neural
network learn more complex patterns in the data.
Structure of Neuron Cell
A neural network is composed of a large number of high-
interconnected processing elements (neurons) working in
parallel to solve a specific problem.
As illustrated in the following figure a neuron i consists of a set
of n connecting links that are characterized by weights Wij.
Structure of Neuron Cell
Each input signal xj applied to the link j is multiplied by
its corresponding weight wij and transmitted to neuron i.
These links product are accumulated by the adder as expressed
by the formula:
1. Supervised Learning
In this type of learning, data are presented together with
teacher information in order to associate the data with the teacher
signal.
Supervised learning algorithms adjust the weights using input-
output data to match the input-output characteristics of a
network to desired characteristics. One of the most popular of
these algorithms is the back-propagation learning algorithm.
The Learning Methods For Neural Networks
2. Unsupervised Learning
The neural network is presented for some data without
getting any teacher information. This type of learning is often used
for data clustering and data analysis.
Neural networks that use unsupervised learning use the
redundancy in the data in order to build up clusters or feature
maps based on a familiarity distance. K-Means clustering algorithm
represents one of unsupervised learning algorithms.
Back-propagation (Bp) Algorithm
It is the training or learning algorithm. It learns by example. If
you submit to the algorithm the example of what you want the
network to do, it changes the network’s weights so that it can
produce desired output for a particular input on finishing the
training.
In order to train a neural network to perform some task, it must
adjust the weights of each unit in such a way that the error
between the desired output and the actual output is reduced.
Back-propagation (Bp) Algorithm
Gradient Clipping
Gradient clipping is a technique that tackles exploding gradients.
The idea of gradient clipping is very simple: If the gradient gets too
large, we rescale it to keep it small. More precisely, if ‖g‖ ≥ c, then