## 2 Materials and Methods
### Data Analysis  
For each of the ten classifiers, we calculated the confusion matrix, precision, recall, and F1 score, as well as the overall classification accuracy, to evaluate the performance. Precision is a measure of how many times a true positive (tp) was identified among the total number of tps and false positives (fps), i.e., \(Precision\ =\ tp/(tp+fp)\). It gives a measure of how many times a positive was predicted as positive among everything that was recognized as positive. Recall, on the other hand, gives a measure of how many times a positive was recognized as positive from everything that should have been predicted as positive, including false negatives (fns), i.e., \(Recall\ =\ tp/(tp+fn)\). In other words, precision measures the accuracy of positive predictions, while recall measures the completeness of positive predictions. Support is the number of occurrences of the class (healthy or osteoporosis) within the specified dataset. These metrics are often used together to evaluate the performance of classification models. The accuracy of the model was calculated through confusion matrices. A confusion matrix shows the count between anticipated values (tp and true negative (tn)) and actually observed values (all predicted values). The number of accurate predictions divided by the total number of predictions gives us the overall accuracy, i.e., \(Accuracy\ =\ tp+tn/(tp+tn+fp+fn)\). The harmonic mean of recall and precision is the F1 score, calculated as \(F_{1}\ =\ 2\times((precision\times recall)/(precision+recall))\). To obtain better accuracy, we performed hyperparameter tuning on the best-performing classifier, the Random Forest classifier. A Random Forest classifier is a meta-estimator that uses numerous Decision Tree classifiers trained on different subsets of the dataset to improve the predicted accuracy and reduce overfitting by averaging the results. The default number of trees in the forest is set by the n_estimators argument. In version 0.22, the default value was changed from 10 to 100, and it now stands at 145. The criterion parameter determines the approach for evaluating the quality of a split, with choices such as \"gini\", \"entropy\", and \"log_loss\". Additional parameters, such as max_depth, min_samples_split, min_samples_leaf, and max_features, provide the ability to finely adjust the growth and splitting criteria of the tree. The decision to employ bootstrapping during tree construction is determined by the bootstrap parameter in the bootstrap approach. Furthermore, the oob_score parameter enables the estimation of generalization performance by utilizing out-of-bag samples. Additional options govern factors such as parallelization (n_jobs), unpredictability (random_state), and verbosity (verbose). In addition, the Random Forest implementation incorporates features such as class weighting, complexity pruning, and monotonicity restrictions. The Random Forest model possesses various attributes such as details regarding the fitted estimators, class labels, feature importances, and out-of-bag estimates, among other characteristics. A random search is a more efficient method for hyperparameter tuning compared to a grid search, as it explores a wider range of hyperparameter combinations. Additionally, the Gini index is preferred over other impurity measures like entropy in certain scenarios due to its simplicity and computational efficiency. For a two-class case, the Gini index is calculated as follows:  
\[G\ =\ \sum_{i\ =\ 1}^{2}p(i)\cdot(1-p(i)) \tag{2}\]  
where \(p(i)\) is the probability of recognizing data points with class \(i\). Hence, the Gini index can be expressed as follows:  
\[G\ =\ p(1)\cdot(1-p(1))+p(2)\cdot(1-p(2))\]  
Since we have only two classes, then both \(p(1)\) and \(p(2)\) are equal to 0.5. \[G\ =\ 0.5\cdot(1-0.5)+0.5\cdot(1-0.5)\]  
\[G\ =\ 0.5 \tag{3}\]  
The hyperparameters in a Random Forest model are utilized to enhance the predictive capability of the model or to optimize its computational efficiency.