Hello and welcome back to the course.
Now that you understand what is activation function, let's proceed in our neural network to understand
how neural network actually works.
This is what we discussed before.
We have our input input layer the data.
We have a hidden layer that are neurons and we have over output layer and we have some weights here.
But this is not this is the simplest form.
This is not a practical and realistic form.
Let's imagine that now we have several neurons or something, as we call it, nodes in hidden layer.
We have something like this.
So we have input layer here, hidden layer here and output layer here.
Now we have several nodes in our hidden layer.
Then each node in the input layer will be connected to the nodes in the hidden layers just like this.
And each nodes and the hidden layer is will be connected to the outputs just like this.
And.
But the important thing.
That we should consider is the weights are sometimes zero.
And each node in the hidden layer just consider and evaluate some of the input nodes and evade debates
to them, not all of them.
So it's not like this.
The real format, the real shape of these connections is something like this.
OK, so the first format was this.
And in a realistic format, because some of the weights are zero and we don't have weights for all of
these connections.
So the realistic format is something like this.
And, uh.
Now, we created our neural network.
So this is a practical format of the neural network that we created in a schematic and fit, but how
this network learned to predict for us, let's go into that parts very important and interesting.
Let's review it again and start with one of the inputs, just as an example, let's go for input for
this one.
So we have three connections to hidden layer and three weights.
OK, these three connections and these three weights.
So then it will give us the outputs as a prediction result.
That is why.
This one, this is the output of the prediction results.
We have also the actual values and we are giving it to our model for training purposes.
So we have actual values as well.
And we call that.
Why crime?
So this is the predicted value that comes from this input's, it is spit out the predicted value for
us.
That is why.
And we have our actual values that for training purposes, that is why Prime.
Now, the next step is actually modeled, tries to make a difference between this white prime and white
and creates a cost function for us.
So the cost function is actually the difference of predicted value and actual value in the power of
two.
So, as you can guess, the model tries to minimize this cost function in order to minimize the difference
between the actual value and the predicted value.
So.
In the next step, the results of the cost function will be feedback to neural network and then updating
the weights or let's say adjusting them.
Based on those feedbacks, OK, so let's review it together again, we use we selected the eggs for
we have three weights here.
It goes through a heating layer.
It spit out a predicted value for us.
That is why.
And we have our actual values, the value that is why prime the difference between this, why and why
Prineville will create a lower cost function base than this cost function that we want to minimize it.
It's.
Gives the feedback to our neural nets in order to adjust the weights in a proper way to minimize this
cost function.
OK, so it's not very complicated.
It's very straightforward.
So the final aim is actually minimizing the overall cost function that you can see here.
What is Aurel class function?
Because this this that we discussed together, this process is just for one role.
OK, so this is happened for all the rows, all the samples that you have in your data sets, and it
goes until the end of your data sets.
So at the end, the final aim will minimizing the overall cost function of all these rows.
OK, something like this, the sigma, the summation of all these cost functions.
This purpose of going back and updating the weights is called back propagation, but how we can minimize
this cost function.
This is not a question that we will answer.
That's in our next tutorial.
But before closing this tutorial and going to the next one to find out how we can minimize this cost
function and how neural network acts in this regard, I want to suggest an article for you.
If you are interested in finding more details about back propagation in neural network in two or two
of the back propagation or network, you can find it out in this paper, in this research by Robert
Nillson, I hope I pronounce the name correctly.
That is published in nineteen ninety two and you can find some details there and you will be more familiar
with the back propagation process because I just tried to explain it for you in the easiest manner and
just tell you the concept of the back propagation so you will understand the concept behind how neural
networks is learning.
So in the next tutorial we are going after understanding the how neural network optimize the cost function
in order to actually minimize the cost function and also then keep exercising and enjoy taxers.