Perceptron in Machine Learning
Perceptron in Machine Learning
Machine Learning
In Machine Learning and Artificial Intelligence. It is the primary step
to learn Machine Learning and Deep Learning technologies, which
consists of a set of weights, input values or scores, and a
threshold. Perceptron is a building block of an Artificial Neural
Network. Initially, in the mid of 19th century, Mr. Frank
Rosenblatt invented the Perceptron for performing certain
calculations to detect input data capabilities or business intelligence.
Perceptron is a linear Machine Learning algorithm used for supervised
learning for various binary classifiers. This algorithm enables neurons
to learn elements and processes them one by one during preparation.
Basic Components of Perceptron
Linear Function
Equation : Linear function has the equation similar to as of a straight
line i.e. y = x
No matter how many layers we have, if all are linear in nature, the
final activation function of last layer is nothing but just a linear
function of the input of first layer.
Range : -inf to +inf
Uses : Linear activation function is used at just one place i.e.
output layer
For example : Calculation of price of a house is a regression
problem. House price may have any big/small value, so we can apply
linear activation at output layer.
Sigmoid Function
It is a function which is plotted as ‘S’ shaped graph.
Equation : A = 1/(1 + e-x)
Nature : Non-linear. Notice that X values lies between -2 to 2, Y values are very steep.
This means, small changes in x would also bring about large changes in the value of Y.
Value Range : 0 to 1
Uses : Usually used in output layer of a binary classification, where result is either 0 or 1,
as value for sigmoid function lies between 0 and 1 only so, result can be predicted easily
to be 1 if value is greater than 0.5 and 0 otherwise.
Tanh Function
Uses: - Since its values typically range from -1 to 1, the mean again
for hidden layer of a neural network will be 0 or very near to it. This
helps to centre the data by getting the mean close to 0. This greatly
facilitates learning for the following layer.
RELU Function
It Stands for Rectified linear unit. It is the most widely used activation
function. Chiefly implemented in hidden layers of Neural network.
Equation :- A(x) = max(0,x). It gives an output x if x is positive and
0 otherwise.
Value Range :- [0, inf)
Nature :- non-linear, which means we can easily backpropagate the
errors and have multiple layers of neurons being activated by the
ReLU function.
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.
Softmax Function