## 5 Machine Learning Classification  
IMU-based fall detection is a widely explored approach that leverages the motion and orientation data captured by inertial measurement units to detect fall events. By analyzing the patterns and characteristics of the IMU data, it becomes possible to identify sudden changes or anomalies that may indicate a fall. This section outlines a study of different machine learning and deep learning algorithms for assistive walker fall detection and motion classification using the walker dataset that we developed in Section 4.  
To identify the most suitable classification algorithm for our problem, we implemented a systematic grid search strategy using the Scikit-Learn set of classifiers, initially exploring a wide range through the all_estimators tool. This approach not only allowed us to evaluate the broad landscape of classification algorithms but also ensured that we did not overlook any potential high-performing candidates.  
For a more rigorous evaluation, we employed a k-fold cross-validation technique for each algorithm, performing 10 rounds of training and testing processes. Throughout this evaluation, we not only considered accuracy but also considered other essential performance indicators, including precision, recall, and F1 score, ensuring a holistic assessment of each classifier's capability.  
From this evaluation, the top 10 classifiers, based on their average accuracy, were shortlisted for further analysis. It is worth noting that these algorithms were initially tested with their default parameters. In this machine learning search process, we further improved the classification performance with dedicated hyperparameter tuning.  
We also explored the performance of deep learning using a six-layered convolutional neural network (CNN) that was adapted from the classic Lenet-5 architecture in image classification. The CNN architecture is shown in Figure 6. The input of the CNN network is 160 points of 6-axis data collected by the IMU sensor, so the input feature size is 160-by-6. Data were first fed through four convolution layers used for feature extraction. Each layer encompasses 2-D filters for convolution, data pooling, and reLU functions. Data then enter two fully connected layers and a softmax layer. The CNN produces the four-class classification results as the output.  
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Column Name** & **Data Type** & **Units** & **Description** \\ \hline Activity\_Type & String & - & Class label (“idle”, “motion”, “step”, or “fall”) \\ \hline Acc\({}_{x_{1}}\) to Acc\({}_{x_{100}}\) & Float & m/s\({}^{2}\) & Acceleration data for X-axis (160 samples) \\ \hline Acc\({}_{y_{1}}\) to Acc\({}_{y_{100}}\) & Float & m/s\({}^{2}\) & Acceleration data for Y-axis (160 samples) \\ \hline Acc\({}_{x_{2}}\) to Acc\({}_{x_{100}}\) & Float & m/s\({}^{2}\) & Acceleration data for Z-axis (160 samples) \\ \hline Gyro\({}_{x_{1}}\) to Gyro\({}_{x_{100}}\) & Float & deg/s & Gyro data for X-axis (160 samples) \\ \hline Gyro\({}_{y_{1}}\) to Gyro\({}_{y_{100}}\) & Float & deg/s & Gyro data for Y-axis (160 samples) \\ \hline Gyro\({}_{x_{2}}\) to Gyro\({}_{x_{100}}\) & Float & deg/s & Gyro data for Z-axis (160 samples) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Dataset schema for the inertial measurement unit-based walker motion recording.  
Figure 6: Architecture of a simple convolutional neural network for motion classification.