4.2 Traditional machine learning approach
4.2.2 Custom classifiers
The custom classifiers are derived to confirm whether the accelerometer data is suitable for feature extraction. The main intention of these classifiers is to point the existence of activity-specific patterns. The found patterns can be further used for discrimination between different activities.
The process of pattern discovery is done using six different custom classifiers. These classifiers extract basic information from the accelerometer data in order to determine unique patterns for six different activities. The included activities require the usage of one hand such as writing and brushing teeth, the usage of both hands such as washing hands, eating a meal, and flossing, and hands free activities such as walking.
The accelerometer readings provided from the wearable devices attached on both hands are utilized for this task. The data for each activity is segmented in time windows
with a length of 10 seconds. All of the features are computed within the time windows. The initial features extracted for the aforementioned six activities are the mean values computed per axis over a time window. Additionally, the standard deviations are also computed. Figure 19 provides information related to the distribution of the mean values, the standard deviations and the outliers over the X, Y and Z axes for each activity, respectively. The distribution of mean values for the time windows over the X axis in Figure 19 points to a distinction between brushing teeth and all other activities. Furthermore, the distribution of mean values over the Y axis highlights the distinction between flossing and the rest of the activities. Additionally, the Z axis analysis provides clear distinction brushing teeth and walking.
In conclusion, axis-wise features offer poor discrimination when used in isolation. However, a clearer distinction when the features from all axes are used together for the activities writing, brushing teeth, flossing and washing hands can be achieved. On the contrary, these features do not provide enough information for describing the activities walkingand eating a meal.
Figure 19. The distribution of the mean values computed over the time windows for each axis. The computations are performed for six different activities: writing, brushing teeth walking, flossing, washing hands and eating a meal.
Further investigation is done using similar basic features including the maximum axis value, minimum axis value and median axis value. Nevertheless, these have proven to be less important when compared to the means and their corresponding standard deviations.
Furthermore, the crossings between the axes are investigated as shown in Figure 20. The example of one segment of the activity washing hands provided in Figure 20 points
Figure 20. The accelerometer readings for the X, Y and Z axes for one time window of the activity washing hands. The red window in the left sub-figure represents the segment provided in the right sub-figure together with all of the crossings between the three axes.
out to the numerous crossings between the X, Y and Z axes.
For each activity a range of possible values is defined using the mean value of crossings and the corresponding standard deviation as presented in Figure 21. The mean of the number of crossings between the X and Y axes points out that washing hands and flossing are quite similar. On the contrary, the mean of the number of crossings between the X and Z axes highlights the difference between these two activities whereas for flossing there are almost no crossings, while for washing hands there are more than 40 crossings in average. Similarly, the difference between writing and brushing teeth can be concluded from the mean of the crossings between X and Y axes where the averages are near 10 and near 30, respectively. Additionally, the difference between writing and brushing teethcan be seen from the mean number of crossings between the Y and Z axes where the averages are above 50 and near 0, respectively. However, the means of the number of crossings between X and Z axes for the activities writing and brushing teeth are almost equal. The same can be applied for the other activities when the crossings between the pairs of axes are combined and investigated together.
Next, for each activity, the simple linear regression method is used for finding the slope of the regression line per axis, as described in Section 2.4.1. The slope ranges computed in degrees for each activity are presented in Figure 22. When the focus is on the slope ranges based on the X axis there is a distinction in the distributions between writing, brushing teeth and eating a meal. The Y axis slope distributions provide distinction between walking and flossing where the highest number of slopes are in the ranges from 0 to 30 degrees and −10 to 5 degrees, respectively. The Z axis slope distributions of
Figure 21. The mean value of the overall intersects between the pairs of axes values computed over the time windows along with their corresponding standard deviations for six different activities: writing, brushing teeth walking, flossing, washing hands and eating a meal.
writingand brushing teeth additionally confirm their difference. However, the differences in the slope ranges for X axis between the activities writing and brushing teeth are quite poor. In conclusion, discrimination can be achieved when the slope distributions over all axes are used together.
In summary, any traditional ML model will benefit from the artificially constructed features. Additionally, the custom classifiers point out that the accelerometer data is suitable for feature extraction. The aforementioned features are not definite and are solely made from a human’s perspective by evaluating and observing the actual accelerometer readings in both, vector representation and graphical representation. The derived features represent the basis of the feature set used in this thesis.