## 3 Performance Evaluations
### Performance Evaluation Metrics  
Before evaluating the performance of our models, we defined key metrics to assess their accuracy and robustness. We chose Accuracy and F1 Score as the primary performance metrics for evaluating the LSTM-RNN model in the Multi-model Gait-based KAM \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Batch Size & 64 \\ Learning Rate & 0.001 \\ Epochs & 500 \\ LSTM Nodes & 32 \\ LSTM Layers & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Hyperparameters of gait classification models in Multi-model Gait-based KAM Prediction Systems. \begin{table}
\begin{tabular}{c c} \hline \hline
**Label (Value)** & **Description** \\ \hline Knee thrust (0) & exaggerated forward movement of the knee \\ Normal (1) & normal walking \\ Toe in (2) & inward pointing of the toes \\ Toe out (3) & outward pointing of the toes \\ Trunk lean (4) & tilting of the upper body to one side \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Set label values by gait pattern. Prediction System. This choice aligns with our goal of improving KAM prediction accuracy by accurately classifying individual gait patterns. Accuracy is defined as the percentage of correct predictions made by the model over the entire dataset, providing a broad measure of the model's general predictive capability. It is calculated by Equation (4), where \(TP_{\text{kt}}\), \(TP_{\text{tn}}\), \(TP_{\text{ti}}\), \(TP_{\text{to}}\), and \(TP_{\text{tl}}\) represent the true positives for each gait pattern: knee thrust, normal, toe-in, toe-out, and trunk lean, respectively, and \(N\) is the total number of samples. Here, \(TP_{\text{kt}}\) is defined as the cases where the actual gait pattern \(A_{\text{kt}}\) matches the predicted gait pattern \(R_{\text{kt}}\). A high Accuracy score indicates that the model is effective in generalizing across diverse gait patterns, minimizing misclassifications. \[\text{Accuracy}=\frac{TP_{\text{kt}}+TP_{\text{n}}+TP_{\text{ti}}+TP_{\text{to }}+TP_{\text{tl}}}{N} \tag{4}\]  
F1 Score, the harmonic mean of Precision and Recall, is useful for unbalanced class distributions, as it balances the trade-off between Precision (the correctness of positive predictions) and Recall (the completeness of capturing actual positives). It is calculated by Equation (5), with Precision and Recall defined in Equations (6) and (7). Here, \(FP\) represents the number of false positives, where the model incorrectly predicts a positive class, and \(FN\) represents the number of false negatives, where the model fails to detect an actual positive class. F1 Score highlights the model's ability to handle both frequent and infrequent gait patterns accurately, which is crucial in our study where certain gait patterns may appear more frequently than others. \[\text{F1 Score}=\frac{2\cdot\text{Precision}\cdot\text{Recall}}{\text{ Precision}+\text{Recall}} \tag{5}\]  
\[\text{Precision}=\frac{TP}{TP+FP} \tag{6}\]  
\[\text{Recall}=\frac{TP}{TP+FN} \tag{7}\]  
For KAM prediction, we use the Mean Absolute Percentage Error (MAPE) and Root Mean Square Error (RMSE) to evaluate regression accuracy. MAPE measures the error between predicted and actual values as a percentage, providing an intuitive sense of the model's accuracy relative to the actual data scale. MAPE is calculated by Equation (8), where \(A.K_{t}\) is the actual KAM value and \(P.K_{t}\) is the predicted KAM value for each index \(t\) in the dataset of size \(n\). MAPE is particularly useful in this study as it allows for comparing error rates across different KAM values, facilitating a normalized understanding of prediction performance. \[\text{MAPE}=\frac{1}{n}\sum_{t=1}^{n}\left|\frac{A.K_{t}-P.K_{t}}{A.K_{t}}\right| \tag{8}\]  
RMSE, shown in Equation (9), calculates the square root of the mean squared differences between the actual and predicted KAM values, making it sensitive to larger errors. In RMSE, \(A.K_{t}\) represents the actual KAM value, while \(P.K_{t}\) denotes the predicted KAM value.