## 2 Materials and Methods
### Data Processing  
Figure 2 summarizes the workflow. The data from the force sensors were exported in a.csv extension. Forty.csv files were obtained from the experiment, each for one participant. We then merged these.csv files into one file so that the data could be classified into healthy vs. osteoporosis patients based on this dataset. Irrelevant information like date, time, patient ID, etc., was removed from this file. We then checked for missing values and found that there were none. The participants, especially the osteoporosis group, were well trained and acquainted with the walker, so these data contained no significant errors. A few negative values appeared in the dataset due to hand movements during walking; these were removed in the data cleaning process. The size of the data for both groups was not equal. Addressing class imbalance: Upon initial examination, it was discovered that there was an imbalance in the distribution of classes within the dataset. The group of individuals with osteoporosis showed a clear and specific pattern over time. This pattern was characterized by taking a longer time to cover a distance of 10 m, resulting in a greater number of data points compared to the group of healthy individuals. This disparity could lead to prejudice in favor of the dominant category during the training of the model. In order to address this issue, the Synthetic Minority Oversampling Technique (SMOTE) [33] was utilized. SMOTE mitigates class imbalance by creating artificial data instances within the minority class (namely, osteoporosis in this scenario), hence achieving a balanced dataset and promoting a fairer representation of both classes. Data normalization: Following SMOTE, data normalization was performed due to inherent variations observed within the range of 0 N to 100 N, measured at a frequency of 20 Hz (every 0.05 s). Min-Max scaling [34] was employed to normalize the data between a boundary of 0 and 1. This transformation facilitates improved model convergence and learning by scaling all features to a common range. The formula for this normalization technique is given as:  
\[x\ =\ \frac{x-x_{min}}{x_{max}-x_{min}}. \tag{1}\]  
Figure 1: Protocol of the 10 m walk test with a smart walker. Windowing technique for data augmentation: In order to increase the size of the dataset, a windowing approach was employed. Windowing partitions the existing data into smaller subsets, hence augmenting the overall quantity of data points. Windowing in this case involved dividing the force data into segments, resulting in a significant rise in the number of data points that may be effectively used for resampling approaches. Figure 2: Flow chart showing data processing, where ML is machine learning. k-fold cross-validation: The machine learning model was made more robust by implementing k-fold cross-validation, a well-established technique for resampling [35]. This method divides the data into k-folds of equal size. Afterward, the model is trained on k-1-folds and then tested on the remaining fold one at a time. This study utilized a 10-fold cross-validation approach with a value of k set to 10. Cross-validation serves as a protective measure against overfitting and offers valuable insights regarding the model's potential to perform well on new, unseen data. This is particularly important when considering the model's practical use in real-world scenarios. For each fold, 80% of the data were assigned to the training set, and the remaining 20% was set aside for testing. This ensured a thorough assessment of the model's performance. Choosing the appropriate machine learning model: In order to attain the best possible classification results, a thorough assessment of different machine learning methods was conducted. The classifiers used were the XGB classifier, Random Forest classifier, SVM classifier, GB classifier, SGD classifier, Multinomial Naive Bayes classifier, Decision Tree classifier, Logistic Regression, KNN, and AdaBoost classifier.