# Transfer Learning Approach for Human Activity Recognition Based on Continuous Wavelet Transform
## 4 Results
### Model Selection Results  
We evaluated nine network architectures using eight scalogram sets generated from the KU-HAR dataset. To avoid the suboptimal local minima problem, each of the 60 possible combinations was attempted five times, resulting in the training of 300 models. Table 1 contains the highest classification accuracy achieved in five attempts for each combination. As can be observed, the combination of the DenseNet121 architecture, Morlet mother wavelet, and the scale value ranging from 0 to 256 achieved the highest classification accuracy of 97.48%. Hence, this model will be considered the selected one. Table 2 contains metrics of the classification performed using the selected model. It can be observed that the F1-score, unaffected by dataset imbalance, is relatively close to the accuracy value, indicating the reliability of the classification results of the proposed model. Given that the KU-HAR is a realistic dataset (i.e., an unbalanced dataset with no denoising performed), we consider the performance of the proposed model to be rather promising. Figure 4 is a box plot depicting the classification accuracy results of five tries for each tested combination. As shown in Figure 4, the dispersion of accuracy values highly depends on the architecture and CWT configuration chosen. Nevertheless, it is observable that the ResNet101 and ResNet150 are more prone to accuracy scattering. For instance, the difference between the highest and lowest accuracy achieved in five tries for the ResNet101 architecture and the Morlet 32 CWT configuration is 1.88%. At the same time, the accuracy \"window\" for the selected model is only 0.18%, which indicates the stability and dependability of the proposed combination. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Mother Wavelet** & **Mex. Hat** & **Mex. Hat** & **Mex. Hat** & **Mex. Hat** & **Morlet** & **Morlet** & **Morlet** & **Morlet** \\
**Scale Value** & **32** & **64** & **128** & **256** & **32** & **64** & **128** & **256** \\ \hline ResNet50 & 96.21 & 95.79 & 96.06 & 96.27 & 94.06 & 95.47 & 96.15 & 96.71 \\ ResNet101 & 95.84 & 96.13 & 96.32 & 96.31 & 94.46 & 95.79 & 96.15 & 96.90 \\ ResNet152 & 95.78 & 96.11 & 96.45 & 96.63 & 92.77 & 95.18 & 96.24 & 96.63 \\ Xception & - & - & 97.33 & 97.29 & - & - & 96.93 & 97.16 \\ InceptionV3 & - & - & 95.81 & 95.49 & - & - & 96.34 & 96.40 \\ InceptionResNetV2 & - & - & 95.81 & 95.58 & - & - & 96.48 & 96.32 \\ DenseNet121 & 97.27 & 96.96 & 97.11 & 97.24 & 95.81 & 96.82 & 96.87 & 97.48 \\ DenseNet169 & 97.16 & 96.95 & 97.04 & 97.03 & 95.52 & 96.68 & 96.84 & 97.41 \\ DenseNet201 & 97.03 & 96.77 & 97.00 & 96.85 & 95.66 & 96.85 & 96.85 & 97.24 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The highest accuracy achieved in 5 attempts for each combination (in percentages). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Accuracy (\%)** & **Precision (\%)** & **Recall (\%)** & **AUC (\%)** & **F1-Score (\%)** \\ \hline
97.48 & 97.62 & 97.41 & 99.60 & 97.52 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Metrics of the classification performed using the selected model. Considering the selected model architecture, the DenseNet (Densely Connected Convolutional Network) was proposed in [58]. Within a dense block, each layer is connected to every other layer in a feed-forward manner that encourages feature reuse, mitigates the vanishing gradient problem, reduces the number of parameters, and enhances feature propagation. DenseNets are frequently used for magnetic resonance imaging (MRI) analysis [59; 60], radiology image classification [61; 62], and cancer image detection [63]; however, few studies have employed DenseNet-based models in the sensor-based HAR domain [64; 65]. Furthermore, in these works, the models were trained on 1D input data, which may have hindered the model's performance, given that the DenseNet architecture was designed for image classification.