## 6 Results and Discussion
### Inference Evaluation on Raspberry Pi  
Finally, we present the RNNs that were port-mapped onto the Raspberry Pi. We recorded the inference time and model size for each RNN and for each dataset. Figure 13 shows the model sizes of the RNN architectures for the eight datasets and Figure 14 show the inference time of the models on the eight datasets when port-mapped to the edge device. FastRNN and FastGRNN occupied the least space, whereas LSTM and GRU were bulky. A similar observation was made when we recorded the inference time of the models on the Pi. FastRNN, FastGRNN, BasicRNN, and UGRNN were faster than the GRU and LSTM models. The following are the key takeaways after the training and compression of the six Recurrent Neural Network architectures:  
1. Apart from LSTM, the other RNNs like fast gates like FastGRNN, FastRNN, UGRNN, and GRU are potential candidates for application in device-mapping edge-based RNN modeling studies. Similar studies were conducted in Ref. [28]. The Table 17 from Ref. [28] shows the performance of the RNNs but with different hyperparameters used for the RNN architecture. 2. LSTM and GRU require significantly longer training and inference time compared to the other RNN units that we studied. 3. LSTM and GRU are bulkier on the edge device than FastRNN, FastGatedRNN, and UGRNN. 4. Fast gates like FastGRNN and FastRNN are memory-efficient for edge devices, but they show performance deviation compared to the other RNNs of around 0 to 19% across all considered datasets. 5. UGRNN are also potential candidates for edge-based RNN model mapping, showing good performance and smaller memory sizes compared to LSTM and GRU. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \multirow{2}{*}{**RNN Type**} & \multicolumn{4}{c}{**WISDM-FNOW**} & \multicolumn{4}{c}{**WISDM-SNOW**} \\ \cline{2-10}  & **Mean Train Acc.** & **Mean Val Acc.** & **Test Acc.** & **F1 Score** & **Model Size** & **Mean Train Acc.** & **Mean Val Acc.** & **Test Acc.** & **F1 Score** \\ \hline Basic RNN & 0.82 & 0.80 & 0.81 & 0.69 & 1.27 & 0.80 & 0.79 & 0.82 & 0.67 \\ \hline FastGRNN & 0.81 & 0.81 & 0.81 & 0.69 & 1.72 & 0.83 & 0.83 & 0.84 & 0.72 \\ \hline FastRNN & 0.82 & 0.82 & 0.82 & 0.72 & 1.66 & 0.84 & 0.84 & 0.85 & 0.76 \\ \hline UGRNN & 0.93 & 0.92 & 0.93 & 0.89 & 2.90 & 0.87 & 0.88 & 0.89 & 0.82 \\ \hline GRU & 0.88 & 0.87 & 0.88 & 0.82 & 4.15 & 0.97 & 0.96 & 0.97 & 0.95 \\ \hline LSTM & 0.85 & 0.84 & 0.75 & 0.84 & 5.40 & 0.79 & 0.79 & 0.79 & 0.62 \\ \hline Best Performance & \multicolumn{4}{c}{UGRNN} & \multicolumn{4}{c}{GRU} \\ \hline Smallest Model & \multicolumn{4}{c}{FRNN and BasicRNN} & \multicolumn{4}{c}{FRNN, and BasicRNN} \\ \hline Memory Savings via Fast Gates & \multicolumn{4}{c}{1.81\(\times\) with respect to UGRNN} & \multicolumn{4}{c}{2.5\(\times\) with respect to GRU} \\ \hline Performance Deviation via Fast Gates & \multicolumn{4}{c}{up to 17\(\times\)} & \multicolumn{4}{c}{up to 19\(\times\)} \\ \hline \end{tabular}
\end{table} 
Table 16: Performance analysis of RNNs for WISDM Fully Nonoverlapping Window (FNOW)- and Semi Nonoverlapping Window (SNOW)-based HAR task. Mean training accuracy, mean validation accuracy, test accuracy, and F1 score are expressed as normalized %, and model size is expressed in KBy. Text in red is the highest in each category, except those under model size, where text in red represents the smallest model. Data collection and preprocessing play important roles in training the RNNs and consume significant time. * If the class distribution of the dataset is unbalanced, we saw a drop in the F1 score of the RNN model. * A hidden state size of 16 and a single layer are optimal for edge mapping for HAR applications. Increasing the hidden size or layer size improves performance but adversely affects the model size. * Regularization methods like dropout improve model performance after any degradation due to the compression applied on the dense RNN models. * A combination of compression techniques is better than singleton methods.