AI31
AI31
Mr. Frank Rosenblatt invented the perceptron model as a binary classifier which contains
three main components. These are as follows:
Fig: 5.1
Weight parameter represents the strength of the connection between units. This is another most
important parameter of Perceptron components. Weight is directly proportional to the strength
of the associated input neuron in deciding the output. Further, Bias can be considered as the
line of intercept in a linear equation.
o Activation Function:
These are the final and important components that help to determine whether the neuron
will fire or not. Activation Function can be considered primarily as a step function.
Types of Activation functions:
o Sign function
o Sigmoid function
Fig:5.2
The data scientist uses the activation function to take a subjective decision based on various
problem statements and forms the desired outputs. Activation function may differ (e.g., Sign,
Step,and Sigmoid) in perceptron models by checking whether the learning process is slow or
has vanishing or exploding gradients.
consists of four main parameters named input values (Input nodes), weights and Bias, net sum,
and an activation function. The perceptron model begins with the multiplication of all input
values and their weights, then adds these values together to create the weighted sum. Then this
weighted sum is applied to the activation function 'f' to obtain the desired output. This
activation function is also known as the step function and is represented by 'f'.
Fig:5.3
This step function or Activation function plays a vital role in ensuring that output is mapped
between required values (0,1) or (-1,1). It is important to note that the weight of input is
indicative of the strength of a node. Similarly, an input's bias value gives the ability to shift the
activation function curve up or down.
Perceptron model works in two important steps as follows:
Step-1
In the first step first, multiply all input values with corresponding weight values and then add
themto determine the weighted sum. Mathematically, we can calculate the weighted sum as
follows:
Add a special term called bias 'b' to this weighted sum to improve the model's performance.
∑wi*xi + b
Step-2
In the second step, an activation function is applied with the above-mentioned weighted sum,
which gives us output either in binary form or a continuous value as follows:
Y = f(∑wi*xi + b)
This is one of the easiest Artificial neural networks (ANN) types. A single-layered
perceptron model consists feed-forward network and also includes a threshold transfer function
inside the model. The main objective of the single-layer perceptron model is to analyze the
linearly separableobjects with binary outcomes.
In a single layer perceptron model, its algorithms do not contain recorded data, so it begins
with inconstantly allocated input for weight parameters. Further, it sums up all inputs (weight).
After adding all inputs, if the total sum of all inputs is more than a pre-determined value, the
model gets activated and shows the output value as +1.
Like a single-layer perceptron model, a multi-layer perceptron model also has the same
model structure but has a greater number of hidden layers.
The multi-layer perceptron model is also known as the Backpropagation algorithm, which
executesin two stages as follows:
o Forward Stage: Activation functions start from the input layer in the forward stage and
terminate on the output layer.
o Backward Stage: In the backward stage, weight and bias values are modified as per
the model's requirement. In this stage, the error between actual output and demanded
originated backward on the output layer and ended on the input layer.
Multilayer perceptron is one of the most commonly used machine learning method.
The Multi-layer Perceptron network, consisting of multiple layers of connected
neurons.
Multilayer perceptron is an artificial neural network structure and is a non-parametric
estimator that can be used for classification and regression.
thenwe use those activations and the next set of weights to calculate the activations of
the output layer. Now that we’ve got the outputs of the network, we can compare them
to the targets and compute the error.
ii. Backward stage: BACK-PROPAGATION OF ERROR
Backpropagation, or backward propagation of errors, is an algorithm that is designed
to test for errors working back from output nodes to input nodes. The error function that
we used for the Perceptron was
• the outputs of these neurons and the second-layer weights (labelled as w) areused to
decide if the output neurons fire or not
3. the error is computed as the sum-of-squares difference between the network outputsand
the targets
The same accuracy ratio can be achieved even with smaller samples.
F(x) = mx + c
This defines a straight line in the xy-plane.
Uses :- Usually used in hidden layers of a neural network as it’s values lies between -
1 to1 hence the mean for the hidden layer comes out be 0 or very close to it, hence
helps in centering the data by bringing mean close to 0. This makes learning for the next
layer mucheasier.
This is defined by
Uses :- ReLu is less computationally expensive than tanh and sigmoid because it involves
simpler mathematical operations. At a time only a few neurons are activated making the
network sparse making it efficient and easy for computation.