1
00:00:11,100 --> 00:00:16,420
So in this video, I'm going to introduce you to the Human Activity Recognition, a data set.

2
00:00:17,100 --> 00:00:19,900
This is a multiclass classification problem.

3
00:00:20,700 --> 00:00:23,230
The input is a multivariate time series.

4
00:00:23,730 --> 00:00:27,530
So this is a new data format that we haven't yet dealt with in this course.

5
00:00:28,050 --> 00:00:33,000
This lecture will discuss some basic facts about the data set so that you have some sense of the problem

6
00:00:33,000 --> 00:00:34,230
we are trying to solve.

7
00:00:34,830 --> 00:00:39,970
In fact, you may even want to implement the code yourself before looking at the course code.

8
00:00:40,950 --> 00:00:46,200
Note that the data can be found either at the UCI Machine Learning Repository or Kagle.

9
00:00:47,100 --> 00:00:51,360
So I've linked you both of these in the upcoming notebook in case you want to check them out.

10
00:00:56,080 --> 00:01:02,290
OK, so the basic setup for this problem goes like this, this data comes from real experiments on real

11
00:01:02,290 --> 00:01:07,960
people who performs a variety of activities while wearing a smartphone attached to their waist.

12
00:01:08,500 --> 00:01:14,680
Specifically, they perform to six different activities, walking, walking upstairs, walking down

13
00:01:14,680 --> 00:01:17,290
stairs, sitting, standing and laying down.

14
00:01:17,890 --> 00:01:21,850
OK, so those are the six classes that we are going to try and predict.

15
00:01:22,420 --> 00:01:29,170
The input data was collected from the smartphone sensors, specifically the accelerometer and the gyroscope.

16
00:01:33,890 --> 00:01:37,800
So this gives us a linear acceleration and angular velocity.

17
00:01:38,450 --> 00:01:44,180
Note that because physical space has three dimensions, each of these sensors gives us three separate

18
00:01:44,180 --> 00:01:44,870
channels.

19
00:01:45,230 --> 00:01:52,400
So, for example, the acceleration time series would actually be three time series activity, a YFC

20
00:01:52,400 --> 00:01:53,510
and AZT.

21
00:01:54,770 --> 00:01:59,400
Now, one curious fact about this data set is that there are two kinds of acceleration.

22
00:02:00,110 --> 00:02:04,040
One, they call total acceleration and one they call body acceleration.

23
00:02:05,240 --> 00:02:11,570
According to the README, the body acceleration was computed by subtracting gravity from the total acceleration.

24
00:02:12,860 --> 00:02:19,250
So in total, we actually end up having a time series with nine components, three for a total acceleration,

25
00:02:19,430 --> 00:02:23,060
three for body acceleration and three for angular velocity.

26
00:02:27,650 --> 00:02:33,470
OK, so here are some more details about the Time series, each time series was recorded at 50 hertz,

27
00:02:33,770 --> 00:02:40,620
meaning 50 measurements per second, the total duration of each sample was two point five six seconds.

28
00:02:41,090 --> 00:02:45,050
This means that we have one hundred twenty eight measurements for each time series.

29
00:02:45,740 --> 00:02:51,230
That is to say, the length of each time series corresponding to some activity is one twenty eight.

30
00:02:55,810 --> 00:03:01,150
So the Time series we will see in the data set is not the right time series, but the pre-process Time

31
00:03:01,150 --> 00:03:07,560
series, the researchers performed operations such as noise removal, Lopez filtering and scaling.

32
00:03:08,440 --> 00:03:10,940
You can think of Lopez filtering like smoothing.

33
00:03:11,560 --> 00:03:14,050
So basically it removes any fast movements.

34
00:03:14,050 --> 00:03:20,080
In the TIME series, scaling was done so that the main value is minus one and the max value is plus

35
00:03:20,080 --> 00:03:20,470
one.

36
00:03:21,310 --> 00:03:24,850
Because of this, we won't bother to scale the Time series ourselves.

37
00:03:29,500 --> 00:03:35,500
OK, so, again, one important skill you should have is being able to visualize what this Time series

38
00:03:35,500 --> 00:03:36,250
looks like.

39
00:03:36,760 --> 00:03:40,630
The input data, which is a multivariate time series, has the shape.

40
00:03:40,630 --> 00:03:48,250
And by TBD in this case, we know that T is equal to one twenty eight and D is equal to nine and is

41
00:03:48,250 --> 00:03:51,250
somewhere in the thousands for the targets.

42
00:03:51,430 --> 00:03:57,550
We might have a one dimensional array of length then containing the integers zero up to five representing

43
00:03:57,550 --> 00:03:58,690
the six classes.

44
00:03:59,860 --> 00:04:05,470
So knowing how the data should be formatted will be very useful, since as you'll soon see the way the

45
00:04:05,470 --> 00:04:07,470
data is organized is pretty messy.

46
00:04:07,930 --> 00:04:12,910
Everything is in multiple files, so it takes some effort to keep things organized in your mind.

47
00:04:17,370 --> 00:04:22,050
The final topic of this lecture is to consider the question, why should we bother to work with Time

48
00:04:22,050 --> 00:04:22,810
series at all?

49
00:04:23,550 --> 00:04:28,260
As you recall, one important aspect of feature engineering is domain knowledge.

50
00:04:29,040 --> 00:04:35,400
That is, you use your expertise in some domain to engineer useful features for machine learning models.

51
00:04:36,060 --> 00:04:38,280
Well, Time series is one such domain.

52
00:04:38,910 --> 00:04:44,190
In fact, it's not necessary to work with Raw Time series as we have been during this course.

53
00:04:44,610 --> 00:04:50,660
It's also possible to simply compute features from the TIME series and then use tabular machine learning.

54
00:04:51,600 --> 00:04:57,180
In this way, you can treat a time series data set like any other tabular data set you might use.

55
00:04:57,630 --> 00:05:00,900
So I encourage you to check the read me for a full set of features.

56
00:05:01,110 --> 00:05:02,480
But here are some highlights.

57
00:05:03,150 --> 00:05:06,270
We all know about the mean min max and standard deviation.

58
00:05:06,510 --> 00:05:08,570
OK, so these are all features.

59
00:05:09,090 --> 00:05:13,590
We also have Skewness and keratosis, which are more statistical features.

60
00:05:14,640 --> 00:05:19,740
We also have some frequency based features which can be found after taking the Fourier transform.

61
00:05:20,370 --> 00:05:22,350
OK, so lots of interesting stuff.

62
00:05:23,160 --> 00:05:27,460
In fact, you might want to have a look at these in case they are useful in your own work.

63
00:05:28,530 --> 00:05:33,960
What we'll do later in this section is compare models that only use these features with models that

64
00:05:33,960 --> 00:05:35,570
use the original time series.

65
00:05:36,030 --> 00:05:40,890
In addition, using what we know about how to build neural networks and sensor flow, we'll build a

66
00:05:40,890 --> 00:05:44,940
hybrid model that makes use of both the Time series and their features.

67
00:05:45,270 --> 00:05:48,690
So it'll be interesting to see which kind of approach works best.
