1
00:00:11,060 --> 00:00:17,600
In this video, we'll be looking at how to use Arnon's for human activity recognition, since you've

2
00:00:17,600 --> 00:00:23,150
seen most of this code before, the majority of this lecture will focus on how to build the Arnim and

3
00:00:23,150 --> 00:00:24,600
also to look at the results.

4
00:00:25,100 --> 00:00:30,470
So if you have not yet seen how to pass the data files, please go to the lectures where that was done.

5
00:00:31,430 --> 00:00:37,670
As usual, we'll be testing two different models, one that only uses the Time series and one that combines

6
00:00:37,670 --> 00:00:40,010
the Time series with static features.

7
00:00:41,810 --> 00:00:43,800
OK, so let's start with the imports.

8
00:00:44,300 --> 00:00:47,420
You'll notice that I've decided again to use the ASTM.

9
00:00:47,900 --> 00:00:54,160
However, you're encouraged to try other RPN units as well, including the GIU and even the simple in.

10
00:01:00,440 --> 00:01:02,360
The next step is to download the data.

11
00:01:10,740 --> 00:01:13,800
The next step is to unzip the zip file we just downloaded.

12
00:01:18,040 --> 00:01:23,050
The next step is to set a few constants, including the sequence length number of samples, a number

13
00:01:23,050 --> 00:01:25,240
of dimensions and number of classes.

14
00:01:29,240 --> 00:01:34,790
The next step is to define our data loading function, as you recall, this loads in the Times series

15
00:01:34,790 --> 00:01:40,210
files and converts them into arrays of size NBT videos for both train and test.

16
00:01:40,700 --> 00:01:44,030
Since I've explained this function before, I won't do so again.

17
00:01:50,300 --> 00:01:55,370
The next step is to call a function to get X train, Y train, X test and Y test.

18
00:02:00,300 --> 00:02:05,490
The next step is to plot one of the multivariate time series samples, so you remember what they look

19
00:02:05,490 --> 00:02:05,970
like.

20
00:02:13,510 --> 00:02:19,900
The next step is to create our LSM Arnon, so you can see that I've decided to set return sequences

21
00:02:19,900 --> 00:02:22,610
equal to true and to use global max pooling.

22
00:02:23,380 --> 00:02:29,780
I've also commented out one extra calcium layer to remind you that you can add however many you choose.

23
00:02:30,250 --> 00:02:35,920
As always, please test different configurations and check the results if you're curious about how they

24
00:02:35,920 --> 00:02:36,700
will perform.

25
00:02:45,180 --> 00:02:48,570
The next step is to call, compile and fit, as we normally do.

26
00:02:56,460 --> 00:02:58,680
The next step is to plot the laws per epoch.

27
00:03:03,160 --> 00:03:05,030
So the last report looks OK.

28
00:03:08,340 --> 00:03:11,010
The next step is to check the accuracy prepack.

29
00:03:15,220 --> 00:03:21,790
So the accuracy looks OK, but note that it seems quite low compared to the other models we've seen.

30
00:03:25,320 --> 00:03:29,460
The next step is to load in our best model and check the accuracy on our test said.

31
00:03:35,020 --> 00:03:42,700
OK, so our model only achieves about 90 percent, so this confirms our suspicions that the Arnim underperforms

32
00:03:42,880 --> 00:03:44,920
compared to the other models we've studied.

33
00:03:48,390 --> 00:03:53,400
The next step is to write a function that will load in the tabular features, since I've explained this

34
00:03:53,400 --> 00:03:55,550
code before, I won't explain it again.

35
00:04:01,050 --> 00:04:03,750
The next step is to load in our tabular features.

36
00:04:09,180 --> 00:04:15,420
The next step is to create our combined aren't in, so we start by creating an A-list demand that ends

37
00:04:15,420 --> 00:04:16,710
with global max pooling.

38
00:04:16,860 --> 00:04:21,840
As per usual, as you recall, this ends up with a single feature vector.

39
00:04:26,040 --> 00:04:29,490
The next step is to create our anend branch for the tabular features.

40
00:04:29,940 --> 00:04:32,910
Note that this also gives us a single feature vector.

41
00:04:36,960 --> 00:04:42,180
The next step is to combine the two feature vectors together and then pass the results through the final

42
00:04:42,180 --> 00:04:42,920
dance layer.

43
00:04:48,540 --> 00:04:50,370
The next step is to call Plott model.

44
00:04:56,520 --> 00:05:02,610
So as you can see, our model consists of two input branches which then merge into a single branch to

45
00:05:02,610 --> 00:05:04,140
give us one final prediction.

46
00:05:08,120 --> 00:05:11,120
The next step is to call, compile and fit once again.

47
00:05:19,410 --> 00:05:21,690
The next step is to plot the laws prepack.

48
00:05:25,900 --> 00:05:27,800
So the last report looks OK.

49
00:05:30,960 --> 00:05:33,630
The next step is to plot the accuracy prepack.

50
00:05:38,380 --> 00:05:40,550
So the accuracy looks OK.

51
00:05:40,930 --> 00:05:45,070
Better than before, but it still doesn't outperform the previous models we've seen.

52
00:05:48,520 --> 00:05:52,450
The next step is to load up our best model and check how it performs on the test, said.

53
00:05:57,750 --> 00:06:03,420
So as you can see, while the test accuracy does improve with the features, it still fails to achieve

54
00:06:03,420 --> 00:06:04,860
the results we saw before.
