1
00:00:01,980 --> 00:00:02,570
Hello.

2
00:00:02,640 --> 00:00:03,510
Welcome back.

3
00:00:03,510 --> 00:00:09,780
Now let's increase the number of inputs to three let's say we want to predict whether a person is sad

4
00:00:09,870 --> 00:00:16,640
or happy given the temperature the humidity and the air quality.

5
00:00:16,710 --> 00:00:19,360
This is what a neural network would look like.

6
00:00:19,500 --> 00:00:28,500
Note that we have three weights one for temperature one for humidity the third one for air quality to

7
00:00:28,500 --> 00:00:34,930
compute the predicted result we perform what is called the weighted sum.

8
00:00:35,130 --> 00:00:43,470
This means we treat this neuro network as three separate single inputs single output neuro networks

9
00:00:43,770 --> 00:00:48,900
and then we add up the predicted values of the three separate networks.

10
00:00:48,900 --> 00:00:51,410
This is what the pseudocode would look like.

11
00:00:51,480 --> 00:01:00,150
We multiply temperature inputs by weight we multiply humidity inputs by weight and then we multiply

12
00:01:00,240 --> 00:01:01,750
air quality by weight.

13
00:01:02,370 --> 00:01:10,560
But to be specific we multiply temperature inputs by weight one we more to apply humidity input by weight

14
00:01:10,590 --> 00:01:18,900
to we more to apply air quality input by way 3 and then we add up the three products let's say we have

15
00:01:18,990 --> 00:01:28,410
an array of temperature values and air quality values and humidity values if we want to perform that

16
00:01:28,410 --> 00:01:29,880
prediction.

17
00:01:29,880 --> 00:01:32,820
This is the pseudocode we're going to have.

18
00:01:32,820 --> 00:01:38,460
So we have an array of three temperature a we have an array of temperatures an array of temperature

19
00:01:38,460 --> 00:01:41,500
values sorry humidity values air quality values.

20
00:01:41,820 --> 00:01:47,160
Let's say we just select the first one and then we create a new record input.

21
00:01:47,280 --> 00:01:54,840
We take this new record input we pass it to our our multiple input and an end which is which means more

22
00:01:54,840 --> 00:02:02,500
tuple input single output in your network just by passing this we should be able to make that prediction.

23
00:02:02,580 --> 00:02:05,270
And this function is implemented.

24
00:02:05,370 --> 00:02:15,570
We wrap the function around the multiple input and function the the uh the algorithm basically mathematically

25
00:02:15,570 --> 00:02:17,530
is the weighted sum algorithm.

26
00:02:17,820 --> 00:02:26,010
But to make it much more readable we wrap it around this other function that we call multiple input

27
00:02:26,790 --> 00:02:36,480
over here multiple input underscore and so let's go and try to write some code to demonstrate this.

28
00:02:36,570 --> 00:02:39,750
If you have any questions just let me know but it's as simple as this.
