1
00:00:00,550 --> 00:00:00,980
Hello.

2
00:00:01,030 --> 00:00:01,620
Welcome back.

3
00:00:02,170 --> 00:00:07,990
Let's say you want to design in Europe network to predict how much muscle as you gain given how many

4
00:00:08,080 --> 00:00:15,130
hours you workout and how many hours you rest let's say you recorded the number of hours you worked

5
00:00:15,130 --> 00:00:21,460
out the number of hours you rested on the muscles you gained in the last three workout sessions and

6
00:00:21,460 --> 00:00:24,890
you want to use this data to train your neural network.

7
00:00:24,910 --> 00:00:33,250
This table over here represents that data once your model is properly trained you will simply enter

8
00:00:33,250 --> 00:00:39,670
the number of hours you want to work out tomorrow and a number of hours you want to rest tomorrow and

9
00:00:39,700 --> 00:00:42,230
it will predict how much muscles You will gain.

10
00:00:43,060 --> 00:00:50,290
Let's just say you are a Coda and a professional body builder and you want to use this to optimize your

11
00:00:50,290 --> 00:00:51,830
body building.

12
00:00:51,850 --> 00:00:55,300
This is called a supervised regression problem.

13
00:00:55,300 --> 00:00:58,360
It is supervised because our examples.

14
00:00:58,360 --> 00:01:01,540
It is supervised because we have examples and inputs.

15
00:01:01,540 --> 00:01:08,890
I should say and it's a regression problem because we have predicting your muscle gain which is continuous

16
00:01:08,980 --> 00:01:10,210
output.

17
00:01:10,210 --> 00:01:15,190
If we were predicting your mood I said whether you happy or sad.

18
00:01:15,190 --> 00:01:18,880
This will be called a classification problem not a regression problem

19
00:01:21,660 --> 00:01:28,740
before we throw our data into the model we need to account for the differences in the unit of our data

20
00:01:29,340 --> 00:01:39,420
both of our inputs are in ours but our output is in grams and the output values we are dealing with

21
00:01:39,420 --> 00:01:42,870
here are more than ten times larger than the input.

22
00:01:43,020 --> 00:01:44,810
This will be a problem.

23
00:01:44,820 --> 00:01:49,020
The solution to this is to scale our data this way.

24
00:01:49,050 --> 00:01:53,070
Our model only sees standardised units.

25
00:01:53,190 --> 00:01:58,950
We are going to take advantage of the fact that all of our data is positive and simply divide by the

26
00:01:58,950 --> 00:02:09,470
maximum value for each variable effectively scaling the result to be between 0 and 1 x over here represent

27
00:02:09,500 --> 00:02:11,330
our input.

28
00:02:11,630 --> 00:02:16,210
That is hours of work out and hours of rest.

29
00:02:16,220 --> 00:02:21,070
And y represent the output which is muscle gain.

30
00:02:21,090 --> 00:02:23,920
Now we can build our neural network.

31
00:02:24,240 --> 00:02:34,730
We know 0 our new network must have 2 input and one output the because of the table we have because

32
00:02:34,730 --> 00:02:37,710
these are the dimensions of our data.

33
00:02:37,790 --> 00:02:43,640
We will call AWA because of the table which also gives us the date dimension.

34
00:02:43,760 --> 00:02:54,380
So after we've normalized by multiplying 0 by dividing each each input type and output type by its maximum

35
00:02:54,380 --> 00:02:57,510
value to normalize it to be between 0 and 1.

36
00:02:57,540 --> 00:03:05,220
We are ready to put in our a word neural network and we know the dimension because of the input we have

37
00:03:05,220 --> 00:03:15,310
two inputs one output input one input to one output and we have three examples these ones.

38
00:03:15,360 --> 00:03:23,190
The rules here indicate to the examples Column 1 Column 2 input 1 input to output as simple as the

39
00:03:26,630 --> 00:03:27,850
Yeah we are.

40
00:03:29,140 --> 00:03:34,870
Now we can build on your network like I said and we know our network must have two inputs and one output

41
00:03:34,930 --> 00:03:38,890
like I just said because these are the dimensions of our data.

42
00:03:38,890 --> 00:03:47,460
We will call our output y hot because it is an estimate of y y how it is basically the new name we've

43
00:03:47,470 --> 00:03:57,460
given to the predicted value and y is the expected value any layer between our input and output layer

44
00:03:57,520 --> 00:03:59,480
is called the hidden layer.

45
00:03:59,690 --> 00:04:06,880
Here we are going to use one hidden layer with three hidden units but if we wanted to build a deep neural

46
00:04:06,880 --> 00:04:16,620
network we would just stack a bunch of layers together cycles in our neural network here represent neurones

47
00:04:16,710 --> 00:04:20,260
and lines represent synopses synopsis.

48
00:04:20,340 --> 00:04:22,380
Have a really simple job.

49
00:04:22,380 --> 00:04:29,810
They take a value from the input multiplied by a specific weight and output the result.

50
00:04:29,810 --> 00:04:30,950
Then move on.

51
00:04:31,110 --> 00:04:39,600
Add together the output of all the synopsis and apply on activation function search and activation functions

52
00:04:39,750 --> 00:04:47,120
allow neuro networks to model complex nonlinear patterns that simpler models may miss.

53
00:04:47,220 --> 00:04:53,600
We should deal with various activation functions later on in the course.

54
00:04:53,700 --> 00:05:01,110
Over here is the activation function and we shall apply to the output of our neuron Zi represent the

55
00:05:01,110 --> 00:05:08,450
results from the neuron each couple to X here represent the results coming from each synapse.

56
00:05:08,460 --> 00:05:17,470
The snaps result is computed by multiplying the inputs by a weight the weight is not indicated in this

57
00:05:17,470 --> 00:05:18,940
slide over here.

58
00:05:18,990 --> 00:05:26,610
Each input value or element in matrix X needs to be more applied by a corresponding weight and then

59
00:05:26,670 --> 00:05:31,210
added together with all the other resort for each neuron.

60
00:05:31,230 --> 00:05:36,930
This is a complex operation but if we take the three outputs we are looking for us a single row of a

61
00:05:36,930 --> 00:05:43,130
matrix and place all our individual weight into a matrix of weight.

62
00:05:43,230 --> 00:05:50,940
We can create the accept behavior we need by multiplying our input data matrix by our weight matrix

63
00:05:52,620 --> 00:06:00,450
using matrix multiplication allows us to pass multiple input through at once by simply adding rose to

64
00:06:00,450 --> 00:06:08,760
the matrix X which will spend a lot of time in this course talking about how to understand the dimensions

65
00:06:08,850 --> 00:06:13,930
of these types of matrices and how to multiply them for now.

66
00:06:13,940 --> 00:06:24,450
Notice that each entry in Matrix Z 2 is a sum of weighted input to each head and neuron Z 2 is of size

67
00:06:24,570 --> 00:06:33,640
through by 3 one row for each example and one column for each head in unit Z 2.

68
00:06:33,820 --> 00:06:43,650
This the matrix multiplication of input and the corresponding weight to the hidden layer to this obtained

69
00:06:44,640 --> 00:06:55,920
by applying our activation function to Z to Z is computed by multiplying the result of a 2 by the weight

70
00:06:55,980 --> 00:07:05,850
of the sign ups connecting the hidden layer to the output layer and finally y hut and finally Y is obtained

71
00:07:05,970 --> 00:07:16,130
by applying our activation function to Z 3 these 4 equations make up what is known as 4 propagation.

72
00:07:16,370 --> 00:07:24,290
We have only 4 equations over here for forward propagation because our neural network has only one hidden

73
00:07:24,290 --> 00:07:31,200
layer later on in the course we shall see how to determine the number of equations for 4 propagation.

74
00:07:31,220 --> 00:07:41,390
Given an arbitrarily large neural network and we are going to dive deeper into food propagation This

75
00:07:41,390 --> 00:07:46,350
is just to give you a simple example using a case study for a bodybuilder.

76
00:07:46,430 --> 00:07:50,730
So if you don't completely grasp for propagation now it is fine.

77
00:07:50,900 --> 00:07:57,260
But I'm sure if you post the um the video and you just observe this slide you would just get it.

78
00:07:57,260 --> 00:08:04,010
It's very straightforward and well presented here but you can always send me a message if um if you

79
00:08:04,010 --> 00:08:06,500
have any confusion at all.

80
00:08:06,500 --> 00:08:12,500
So after further propagation our neural network will undergo gradient descent.

81
00:08:12,500 --> 00:08:20,630
Then back propagation in order to update the weight we shall conclude in this example here we shall

82
00:08:20,660 --> 00:08:27,350
um give another example from scratch where we shall go through the process of forward propagation back

83
00:08:27,350 --> 00:08:33,190
propagation of propagation gradient descent and then back propagation.

84
00:08:33,260 --> 00:08:37,310
So um this is the end of this very lesson if you have any questions at all.

85
00:08:37,970 --> 00:08:41,950
Um just send me a message and I shall see you the next lesson.

86
00:08:42,080 --> 00:08:50,180
And like I said You can post the figure on this slide and just observe the notations that subscript

87
00:08:50,300 --> 00:08:57,230
the um the superscript in everything but again you can skip this or you can just move on with it.

88
00:08:57,230 --> 00:09:01,530
Of course we're going to we're going to create food propagation from scratch again.

89
00:09:02,180 --> 00:09:03,940
This is just a taste of it.

90
00:09:03,950 --> 00:09:04,670
I'll see you later.
