Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

Perceptron in Machine Learning

Uploaded by

karmatseten30
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Perceptron in Machine Learning

Uploaded by

karmatseten30
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Perceptron in

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

Mr. Frank Rosenblatt invented the perceptron model as a binary classifier


which contains three main components. These are as follows:
 Input Nodes or Input Layer:
 This is the primary component of Perceptron which accepts the initial data into the
system for further processing. Each input node contains a real numerical value.
 Wight and Bias:
 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.
 Activation Function:
 In artificial neural networks, an activation function is one that outputs a smaller
value for tiny inputs and a higher value if its inputs are greater than a threshold.
An activation function "fires" if the inputs are big enough; otherwise, nothing
happens. An activation function, then, is a gate that verifies how an incoming
value is higher than a threshold value.
 By generating a weighted total and then including bias with it, the activation
function determines whether a neuron should be turned on. The activation function
seeks to boost a neuron's output's nonlinearity.
 Sign function
 Step function, and
 Sigmoid function
Need of Non-linear Activation
Functions
 An interconnected regression model without an activation function is all that
a neural network is. Input is transformed nonlinearly by the activation
function, allowing the system to learn and perform more challenging tasks.
 It is merely a thing procedure that is used to obtain a node's output. It also
goes by the name Transfer Function.
 The mixture of two linear functions yields a linear function, so no matter
how several hidden layers we add to a neural network, they all will behave
in the same way. The neuron cannot learn if all it has is a linear model. It
will be able to learn based on the difference with respect to error with a
non-linear activation function.
 The mixture of two linear functions yields a linear function in itself, so no
matter how several hidden layers we add to a neural network, they all will
behave in the same way. The neuron cannot learn if all it has is a linear
model.
Linear Function

 Equation: A linear function's equation, which is y = x, is similar to the eqn of


a single direction.
 The ultimate activation function of the last layer is nothing more than a
linear function of input from the first layer, regardless of how many levels we
have if they are all linear in nature. -inf to +inf is the range.
 Uses: The output layer is the only location where the activation function's
function is applied.
 If we separate a linear function to add non-linearity, the outcome will no
longer depend on the input "x," the function will become fixed, and our
algorithm won't exhibit any novel behaviour.
 A good example of a regression problem is determining the cost of a house.
We can use linear activation at the output layer since the price of a house
may have any huge or little value. The neural network's hidden layers must
perform some sort of non-linear function even in this circumstance.
Variants of Activation Function

 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

 The activation that consistently outperforms sigmoid function is


known as tangent hyperbolic function. It's actually a sigmoid function
that has been mathematically adjusted. Both are comparable to and
derivable from one another.

 Activation Functions in Neural Networks


 Range of values: -1 to +1. non-linear nature

 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

 Although it is a subclass of the sigmoid function, the softmax function comes in


handy when dealing with multiclass classification issues.
 Used frequently when managing several classes. In the output nodes of image
classification issues, the softmax was typically present. The softmax function
would split by the sum of the outputs and squeeze all outputs for each category
between 0 and 1.
 The output unit of the classifier, where we are actually attempting to obtain the
probabilities to determine the class of each input, is where the softmax function is
best applied.
 The usual rule of thumb is to utilise RELU, which is a usual perceptron in hidden
layers and is employed in the majority of cases these days, if we really are unsure
of what encoder to apply.
 A very logical choice for the output layer is the sigmoid function if your input is for
binary classification. If our output involves multiple classes, Softmax can be quite
helpful in predicting the odds for each class.

You might also like