## A Review on Perceptron

Consider the biological structure of neural networks. A neural network is a network or circuit of neurons. biological neural network is composed of a groups of chemically connected or functionally associated neurons. In this initially our brain captures the image. Then, it will identify the concepts and recognize it as an apple. These kinds of basic concepts were taught in our school. How to apply the same scenario to a machine? How will a machine do the prediction? Let’s see the concepts of neural networks.

While looking this particular apple, what should come to your mind? For example, I am asking you what this is. You can say it is an apple. How do you identify this is an apple? You are identifying, based on the texture, colour, shape and size. Consider our machine as a child. We can teach to the child from childhood onwards like if the fruit has a crisp and crunchy texture. The colour is red.

The Shape is round and The Size is medium. While I taught to my child  from 6 months onwards about the texture and colour like this  My child  will store the concepts  like this and then she will identify the object very easily. So what is happening here? I had given enough training to my child during her childhood. So she will identify things easily.

Likewise, in a neural network we are going to train the machine based on the given input  and output variable .The differences between biological and artificial neural networks is represented here. While comparing the pictures the inputs such as x0,x2 …xn. to the neural network are compared with axon. And then, the weights w0, w2…wn are compared with, synapse. The activation function and its processing is called a cell body. The edges used to connect with the cell body such as w0 . x0 is called dendrite. The output function Y or predicted variable is compared with output axon. In this way, our biological networks of the brain closely related with artificial neural networks.

# Steps involved in single layer perceptron

1.   First, Takes the inputs, multiplies them by their weights, and computes their sum.

2.   Second, Adds a bias factor, the number 1 multiplied by a weight.

3.    Third, feeds the sum through the activation function.

4.  Fourth,  the result is the perceptron output

Consider a scenario of getting a loan from the bank. In this, based on the salary of you and your better half you will get a loan.  But it is based on the constraint. Here, if both of their salaries are above 50,000. Then only they will get a loan from bank. So this comes under binary classification. There are two possibilities to get a loan or not. Like either they will get a loan denoted by 1 otherwise it is zero.

The given structure is a perceptron learning rule. And tell how the ANN uses a perceptron to perform the correct classification. In this, initially assign the random weights. Then, calculate the predicted output by the equation such as Y equals to sum of the   x I into w i. If the predicted output is differ from actual output then update the weight. The equation to update the weight is w I equals to w I plus delta of w i. Here, delta of w I equals to  learning rate multiplied by the   difference between   actual and predicted   multiplied by x i. After updating the weight by using perceptron rule, we need to find the output such as y in. Again, check the output values. If the predicted output is equal to the actual output then no need to update the weight. Otherwise, we need to update the weight and does this process iteratively up to get the correct classification.

So, this is an algorithm of perceptron training rule. In this, initially assign the random weights. For each of the training sample such as xi to Compute the predicted output Y in. If the predicted output is differ from actual output then update the weight accordingly by using the equation and update the weight.

## Steps for linear classification

1.      In the step 1, read the dataset

2.   In step2, identify and define the features.

3.  In step3, apply one hot encoding which is used to convert each categorical value into a new categorical column and assign a binary value of 1 or 0 to those columns.

4.  In step4, we need to divide the dataset into training and test data.

5.      The above four steps are called as pre-processing of the dataset.

6.  Next apply the data structure to hold the features and labels then implement the model.

7.   Finally train the model with training data and identify the accuracy of the model.

8. Then, predict the mean squared error which is used to identify the differences between actual and predicted output.

9.  Finally, make predictions on the test dat

5/5

## Author Dhivya

### Analytics Vidyalaya

Analytics Vidyalaya is a learning platform for enriching your knowledge. It is sepecially created for the students to uplift their knowledge towards recent technologies and their study materials