So in this video, I'm going to introduce you to the Human Activity Recognition, a data set.
This is a multiclass classification problem.
The input is a multivariate time series.
So this is a new data format that we haven't yet dealt with in this course.
This lecture will discuss some basic facts about the data set so that you have some sense of the problem
we are trying to solve.
In fact, you may even want to implement the code yourself before looking at the course code.
Note that the data can be found either at the UCI Machine Learning Repository or Kagle.
So I've linked you both of these in the upcoming notebook in case you want to check them out.
OK, so the basic setup for this problem goes like this, this data comes from real experiments on real
people who performs a variety of activities while wearing a smartphone attached to their waist.
Specifically, they perform to six different activities, walking, walking upstairs, walking down
stairs, sitting, standing and laying down.
OK, so those are the six classes that we are going to try and predict.
The input data was collected from the smartphone sensors, specifically the accelerometer and the gyroscope.
So this gives us a linear acceleration and angular velocity.
Note that because physical space has three dimensions, each of these sensors gives us three separate
channels.
So, for example, the acceleration time series would actually be three time series activity, a YFC
and AZT.
Now, one curious fact about this data set is that there are two kinds of acceleration.
One, they call total acceleration and one they call body acceleration.
According to the README, the body acceleration was computed by subtracting gravity from the total acceleration.
So in total, we actually end up having a time series with nine components, three for a total acceleration,
three for body acceleration and three for angular velocity.
OK, so here are some more details about the Time series, each time series was recorded at 50 hertz,
meaning 50 measurements per second, the total duration of each sample was two point five six seconds.
This means that we have one hundred twenty eight measurements for each time series.
That is to say, the length of each time series corresponding to some activity is one twenty eight.
So the Time series we will see in the data set is not the right time series, but the pre-process Time
series, the researchers performed operations such as noise removal, Lopez filtering and scaling.
You can think of Lopez filtering like smoothing.
So basically it removes any fast movements.
In the TIME series, scaling was done so that the main value is minus one and the max value is plus
one.
Because of this, we won't bother to scale the Time series ourselves.
OK, so, again, one important skill you should have is being able to visualize what this Time series
looks like.
The input data, which is a multivariate time series, has the shape.
And by TBD in this case, we know that T is equal to one twenty eight and D is equal to nine and is
somewhere in the thousands for the targets.
We might have a one dimensional array of length then containing the integers zero up to five representing
the six classes.
So knowing how the data should be formatted will be very useful, since as you'll soon see the way the
data is organized is pretty messy.
Everything is in multiple files, so it takes some effort to keep things organized in your mind.
The final topic of this lecture is to consider the question, why should we bother to work with Time
series at all?
As you recall, one important aspect of feature engineering is domain knowledge.
That is, you use your expertise in some domain to engineer useful features for machine learning models.
Well, Time series is one such domain.
In fact, it's not necessary to work with Raw Time series as we have been during this course.
It's also possible to simply compute features from the TIME series and then use tabular machine learning.
In this way, you can treat a time series data set like any other tabular data set you might use.
So I encourage you to check the read me for a full set of features.
But here are some highlights.
We all know about the mean min max and standard deviation.
OK, so these are all features.
We also have Skewness and keratosis, which are more statistical features.
We also have some frequency based features which can be found after taking the Fourier transform.
OK, so lots of interesting stuff.
In fact, you might want to have a look at these in case they are useful in your own work.
What we'll do later in this section is compare models that only use these features with models that
use the original time series.
In addition, using what we know about how to build neural networks and sensor flow, we'll build a
hybrid model that makes use of both the Time series and their features.
So it'll be interesting to see which kind of approach works best.