Hello.
Welcome back.
In this lesson we are going to talk about the learn in part of machine learning and machine learning
when we say learning.
We simply mean reducing error.
Learning involves calculating the direction and amount by which we need to change the weight in order
to reduce that difference between the predicted value and the expected value.
Ideally our goal is to make the predicted value as close to the expected value as possible.
As we mentioned earlier the difference between the predicted value and the expected value is what we
call error.
We square this difference to ensure that it is always positive.
We are going to introduce a new variable known as Arrow direction and amount.
I know that's a long name for a variable but it is very descriptive to find the error direction and
amount we subtract the expected value from the predicted value and then we multiply the answer by the
inputs.
We then update the weight by so cracked in the error direction and amount from the weight.
The answer is the new weight this new weight is what is multiplied by the inputs to get the next predicted
value predicted value minus expected value is what is known as Pure error.
Note that over here we do not square the answer.
The pilot error tells us the direction and how much we missed by direction.
I mean whether positive or negative if the pilot error is a positive number it means we predicted too
high.
If the pure error is a negative number it means we predicted too low.
If it is a big number it means we missed by a big amount.
If it is a big number I repeat it means we missed by a large or big amount.
We multiply by the input to get three effect.
If the input is zero then it will force the error.
Difference in amount variable to be zero because there is nothing to learn.
Multiplying the pure arrow by the input will reverse the sine and direction of the arrow direction an
amount variable in the situation where the M word input is negative.
If the input is a pig we want the weight update to be big as well and we get this scale in effect also
by multiplying the pure arrow by the input.
Because this third effect could get out of control we will introduce a new constants known as the land
rate which is denoted by Alpha to prevent the scale in effect.
Now let's update our pseudocode to introduce alpha
in this sort of code rather than compute the error amount and direction in one line.
We have broken it into two lines and also introduce two new verbose known as Delta.
And wait Delta.
We find Delta by subtracting the expected value from the predicted value.
Delta is computed by multiplying the data by the input in effect weights.
Delta is the same as what we previously had as error direction and amount.
Now we update the weight by multiplying debate Delta by D constant Alpha which is the land and rate
and then subtract in the answer from the current weight.
The answer becomes the updated weight over here.
We simply use in alpha equals zero point zero one in which I'll experiment with these values programmatically.
So that's all there is for this lesson.
If you have any questions at all just let me know.
I'll see you later.