# Fall Detection Based on Recurrent Neural Networks and Accelerometer Data from Smartphones
## 3 Results  
In this section, we first present the training and inference time analysis of the models. We begin with this analysis to provide a context for our decision to opt for the GRU architecture. Subsequently, we proceed to analyze the accuracy scores of the solutions available in the literature and compare their results to our approach. Initially, we performed tests to measure the training time for an alternate approach with the LSTM layer in our models. We measured training and inference times for RNN- and BRNN-based models using GRU and LSTM layers to compare the computational efficiency of different recurrent architectures. The RNN model with a GRU layer required approximately 24 s per training epoch, while the bidirectional GRU variant (BRNN) increased this to 47 s. When replacing GRU with LSTM, training times increased notably, 33 s for a standard RNN and 63 s for the BRNN. These results confirm that GRU-based models are significantly more efficient during training, which is particularly beneficial for scenarios involving limited computational resources or frequent retraining. In addition to training time, we also evaluated inference performance of the best performing model. The optimized BRNN model achieved a total inference time of 5.98 s on the entire test set (batch size = 32), corresponding to an average of 74 ms per batch and 2.31 ms per individual sample. When considering the case of processing a 1 s frame of accelerometer data (comprising 50 samples at a 50 Hz sampling rate), the average inference time per window was just 0.77 ms. These results indicate that the model can produce predictions with an average inference time of 2.31 ms per sample, which gives 0.77 ms on average per 1 s of data. This is well within the constraints required for real-time applications. It demonstrates the potential for deploying the proposed solution on low latency platforms, such as mobile or wearable devices, for continuous health monitoring and fall detection. Our goal was to compare these results with those reported in related works. However, we encountered a significant limitation as most publications do not specify the exact context in which their inference time measurements were obtained. For instance, in the study by [PERSON] et al. [20], an average inference time of 282 ms is reported for the PCNN-Transformer model. Unfortunately, the authors do not clarify whether inference times corresponds to the time required for processing a single sample, a batch of samples, or the entire test set. This causes ambiguity and makes direct comparisons challenging and potentiallymisleading. A similar issue arises in the work of [PERSON] and [PERSON] [19], where inference times are reported for models trained on input windows of different lengths of 1 s, 2 s, and 3 s. The corresponding inference times are 1.36 ms, 1.37 ms, and 1.43 ms, respectively. Although they report varying accuracy scores depending on the window size, it remains unclear how these inference times were measured, whether in a batched or unbatched setting, and whether additional preprocessing steps were included. Due to the lack of common process of inference time measurement across studies, we emphasize that our reported times were obtained in a controlled and repeatable environment, with details specified to facilitate reproducibility. The optimized BRNN model achieved a high average accuracy of 99.82%, which means that nearly all samples were correctly classified. Additionally, the F1-score, that balances precision and recall, reached a very close value of 99.80%, reflecting the model's ability to maintain both a low false positive and false negative rates. The precision metric, with an average of 99.82%, confirms that most fall predictions were correct, while the recall of 99.78% suggests that almost all actual falls were successfully detected. These consistently high scores across all evaluation metrics demonstrate the stability of the proposed model in handling the fall detection.