MLops : Session - 11
In today's session, I start with some more terminology as I say in the last session...
Perceptron and Gradient Descent :
Gradient Descent :
Gradient descent is an optimization algorithm used to minimize some function by iteratively moving in the direction of steepest descent as defined by the negative of the gradient. Now I try to explain it with a simple dataset and some figures...
We use this non-realistic dataset of simple Linear Regression so that we understand easily what optimizer does...
So let's assume that duration is our predictor(x) and marks are dependent variable(y) which we going to predict. We take the first row here from our dataset to find the weight for that row using simple Linear Regression formula...
w*x-y=0
We have the value of x and y here and we are trying to find the value of w by hit and trial method here.
Let's assume the value of w is 40. For this value, if we calculate the error, then it is equal to 60. But we have to find that value for which error is almost equal to zero. Here the role of optimizer comes up, next time how the machine decides how it takes the next value of weight so that this decreases error. If we reach nearly Zero, we find our weight then. Let's see for some basic code for gradient descent using TensorFlow.
We are using gradient descent to find out the value of wight. You can see that in the last cell, the initial value of weight is 20, again when we run that function, it decreases this with 3. Then the point is that this is the work of the gradient descent algorithm.
Optimizer uses gradient descent concept. Many algorithms are available like ada etc. We will take about these in some next session.
Perceptron :
In machine learning, the perceptron is an algorithm for supervised learning. This algorithm enables the neuron to learn and process element in a training set at a time.
Deep Learning OR Neural Networks (NN) :
We see in our last session, that we use mostly deep learning for Big Data. We use tensor datatype for this because it supports lazy execution and graph both.
Tensor is similar to the array datatype. We use SKlearn library(API) for machine learning. Same is here, In TensorFlow, we uses Keras for doing operations.
Deep learning is a subset of machine learning where artificial neural networks, algorithms inspired by the human brain, learn from large amounts of data.
The same structure as our brain, we use in deep learning. Here we also have a concept of neurons that help to get information from features and do computation. That's the reason we call it Neural Network.
As you see the first layer is Input layer, the last layer is Output layer and all middle layers are called Hidden layer.
We will talk about more related to these when we start train our model.
See you in the next session...
Happy Learning :)