# Forward Fall Detection Using Inertial Data and Machine Learning
## 4 Testing the Developed Fall-Detection Models Using Experimental Measurements
### Testing the KNN Classifier  
To test the prediction accuracy of the developed Fine KNN model, the experimental recorded data was labeled accordingly, and the prediction accuracy was evaluated by plotting the confusion matrix for all measured scenarios.  
The first test was performed for Subject 1 by considering the damped fall, which was labeled as the Damped_Fall target, the forward undamped fall which was labeled as the Forward_Fall, and the normal gait and sitting in bed events which were labeled as No, in one single test file. The results are shown in Figure 28, in the confusion matrix, where, if there is a red box in the row for Predicted Class and the column for Damped_Fall, Forward_Fall, or No, it indicates that the model failed to detect the right prediction, classifying them incorrectly. For the remaining subjects, the data consists of damped and undamped forward falls and gait events. Figures 28-33 show the KNN network prediction for Subjects 2 to 6.  
Figure 28: KNN network prediction for Subject 1.  
Figure 27: LSTM network prediction for sitting in bed event for Subject 1.  
Figure 30: KNN network prediction for Subject 3.  
Figure 29: KNN network prediction for Subject 2.  
Figure 31: KNN network prediction for Subject 4.  
Figure 32: KNN network prediction for Subject 5.  
The accuracy of detecting the fall event without considering the type of fall, for each person, is presented in Table 4.  
From the presented results, in the case of a fall event, the classifier was capable of distinguishing from the data that a fall event had taken place with a minimum True Positive Rate of 92.5%, illustrating that the model was highly capable of detecting a fall event.  
Regarding the type of fall event, the highest accuracy obtained was for Subject 1, where the TPR values were 98.7% for a damped fall and 98.9% for a forward fall.  
For the damped fall event, the biggest classification error was obtained in the case of Subject 4, where the damped fall had a TPR value of 49.9% and a False Negative Rate (FNR) of 50.1%, from which the forward fall prediction represented 49.2% and for normal activities just 0.9%.  
For the forward fall event, the biggest classification error was obtained in the case of Subject 2, where the forward fall had a TPR value of 89.7% and a False Negative Rate (FNR) of 10.3%, from which the damped fall prediction represented 2.8% and for normal activities 7.4%.  
The predictions relating to the normal activity events presented were correctly predicted, achieving a maximum of 100% for Subjects 2, 3, 4, and 6, and a minimum of 72.6% TPR for Subject 5.  
The models generally performed well across subjects, with high fall detection accuracy. However, there were variations in prediction accuracy, such as 100% for Subject 5 and 92.5% for Subject 2, suggesting that factors like physical differences or sensor placement may have influenced performance. Subject 2's recordings had more noise and lower acceleration values. Similarly, Subject 6 showed variations in acceleration spikes. These inconsistencies  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Type of Fall**} & \multirow{2}{*}{**Subject 1**} & \multirow{2}{*}{**Subject 2**} & \multicolumn{3}{c}{**Accuracy**} \\  & & & **Subject 3** & & **Subject 4** & **Subject 5** & **Subject 6** \\ \hline Damped & 98.8\% & 98.2\% & 99.6\% & 99.1\% & 93.4\% & 98.5\% \\ Undamped & 99.7\% & 92.5\% & 98\% & 97.1\% & 100\% & 98.4\% \\ \hline \hline \end{tabular}
\end{table}
Table 4: Obtained results.  
Figure 33: KNN network prediction for Subject 6.  
impacted the model's performance and special consideration about the type of sensor and placement will be addressed in future studies.