Posts

Showing posts from October, 2019

Step by Step Back Propagation:

Image
A very detailed step by step Back Propagation Example.
Background Backpropagation is the most common method for training any neural network. You can find various papers here and there regarding backpropagation. However, most undergraduate and grate guys like me struggle to understand the equation for backpropagations especially when they involve tons of notations and you have scroll back every time to check which notation means what.  In this post, I'll try my best to explain how it works with a simple example and a pseudo code that can be applied to any number of layers. For a better understanding, y'all should also perform the calculations in order to get a grip on what is going on.
Do check my post on multiclass perceptron classification in case you are interested. Click here to visit the post.

I'll begin with a 3 layer network. The first layer is the input layer obviously. The second layer is the hidden layer and the third layer is the output layer.

I am using the min…

Multiclass Perceptron Implementation

Image
Implement a Multiclass Perceptron In this post, I will explain the working of a multilayer perceptron. We all know that perceptrons have a unit step function as an activation function. So the output will obviously be either 0 or 1. If the computed output is greater than 0 we set the outcome as 1 else 0. This is useful only when we have to classify between two labels. But how do we classify more than 2 labels using a perceptron? Things become easy only when we have two labels and not more than two. 

So in this post, I'll deal with the Iris flower data set. It has 3 flowers namely, Iris-Setosa, Iris-Versicolor, and Iris-Virginica. The tricky part starts now. We have 3 class and we have to train a "Perceptron" to classify among the three flowers. So how do we go ahead?

In order to classify between multiple classes, we will initially need to train two classes at once using the same perceptron and then repeat the same procedure with other classes as well. Let us take an exam…