underlying information of movement patterns,
making it easier to map the complicated data into
predetermined categories. The collected features
should have enough data to train the machine learning
algorithms. Various temporal, frequency, and time-
frequency domain features have been reported to
enhance the efficacy of a HAR system (Rosati et al.,
2018). In this study, the investigated features are:
mean, root mean square, autocorrelation features for
all three axis components (height of the main peak;
height and position of the second peak), spectral peak
features (height and position of the first 6 peaks),
spectral power features (total power in 3 adjacent and
pre-defined frequency bands of 1.5, 5, and 10 Hz) and
signal magnitude area.
2.5 Classification
The feature space is utilized as an input to the
classifier after extracting relevant information from
the segments. The classifier creates the final
mappings from the characteristics associated with
each class. To classify daily-life activities for various
HAR applications, multiple ML classifiers such as
NB, DT, RF, SVM, LDA, KNN, and ANN are often
employed. The performance of several ML
algorithms (classical and ensemble-learning-based)
has been evaluated, as the goal of this work is to
determine the most suited ML classifier for subject-
specific and population-based HAR systems. Table 2
describes the explored ML algorithms as well as the
training parameter choices.
In subject-specific HAR configuration, 70% of
the data from each subject was randomly selected to
train the classifier, and the remaining 30% of the data
was utilized to assess the trained classifier's
performance. A leave-one-out validation technique,
on the other hand, has been used for a population-
based HAR system. The data from nine participants
were initially concatenated and fed into the classifier
for training, then the data from the last subject was
utilized to evaluate the developed ML model. The
technique continued until all of the participants, one
by one, were tested. To assess the performance of
each classifier, the classification accuracy (CA) has
been calculated based on the actual and predicted
results. CA is a percentage that is calculated by
dividing the proportion of accurate predictions by all
possible predictions and multiplying the result by
100. To further validate the results, statistical analysis
has been undertaken by using ANOVA with Tuckey’s
honest post-hoc test to reject the null hypothesis by
considering a P-value of 0.05 significant.
3 RESULTS
3.1 Subject-Specific HAR System
Table 3 presents the CAs for all subjects
corresponding to each investigated classifier. The
cells with bold syntax represent the highest achieved
testing accuracy for each subject. For all the subjects
RF, EAB, ES, and SVM obtained more than 90% CA.
The results indicate that ES achieved the highest
accuracies for most of the subjects (nine subjects)
followed by RF (one subject). Although ES has
obtained the highest CAs for most of the subjects the
RF, EAB, and SVM have also achieved comparable
results.
Mean classification accuracy (MCA) was
calculated by averaging the CA for all subjects
corresponding to each investigated classifier. MCA
for all subjects showed that ES has achieved the
highest MCA of 97.78% followed by RF (96.61%)
and SVM (96.11%). Furthermore, statistical
analysis revealed that ES has outperformed the DT,
KNN, and LDA (P-value < 0.05). However, no
significant difference in MCA of ES, RF, EAB,
SVM, and ANN has been observed (P-value > 0.05).
It can be observed that DT, LDA, KNN, and ANN
performed poorly for SD, SA, WSit, and WLay
activities. Furthermore, although ES, RF, SVM, and
EAB have no statistically significant difference in
MCAs, however, still ES is the only classifier
obtaining more than 90% accuracy for all the
individual activities. Despite having no statistically
significant difference in MCA of ES, RF, EAB,
SVM, and ANN (P-value > 0.05), ES has resulted in
higher CAs for all the classes.
3.2 Population-Based HAR System
In the population-based HAR system, the ML
classifiers were trained on data combined from nine
subjects and tested on the data from the remaining
subject. Table 4 presents the CAs for the population-
based HAR system corresponding to each testing
subject. The highest CAs for individual testing
subjects have been attained by SVM (three testing
subjects), ES (three testing subjects), and RF (two
testing subjects).
All the classifiers attained more than 90%
accuracy corresponding to at least one of the
investigated classifiers except one testing subject
(TSID = 8). According to statistical analysis, SVM
and DT obtained maximum and minimum MCAs
of 95.18% and 86.33%, respectively. However, no