## 4 The Proposed Approach and Its Application to the HFAVD Dataset
The random forest method addresses the issue of overfitting commonly associated with decision trees by combining the predictions of multiple trees to improve accuracy and robustness. While a single decision tree may capture noise in the data, random forests reduce this risk by averaging predictions across many trees, leading to better generalization. Random forest is an ensemble learning method that builds multiple decision trees by using bootstrap sampling (bagging) and random feature selection to reduce correlation between trees [47]. Each decision tree is constructed by using algorithms like ID3 (Iterative Dichotomiser 3), C4.5, or CART (Classification and Regression Trees). These algorithms split nodes based on criteria such as Gini impurity or entropy/information gain for classification problems, like detecting human fatigue. The final random forest prediction is made by aggregating results--majority voting for classification. It also uses out-of-bag (OOB) error for performance estimation and can calculate feature importance. It is important to mention that the dataset, collected during working hours at various times of the day, reflects a greater number of non-fatigue state samples compared with fatigue state samples. For the testing dataset, this imbalance is evident, with the non-fatigue state (853 samples) samples being almost twice as numerous as the fatigue state samples (358 samples). This imbalance can make the accuracy metric less reliable, as it may not \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **Distinct Characteristics** & **Accuracy** & **F1-Score** \\ \hline SVC & RBF kernel, C = 1.0, gamma = ‘scale’ & 93.48\% & 0.4831 \\ Logistic regression & L2 penalty, C = 0.001, solver = ’lfbgs’ & 96.27\% & 0.52147 \\ MLP & Two hidden layers, ReLU activation, Adam solver, lr = \(1\times 10^{-3}\) & 96.27\% & 0.8719 \\ Decision tree & Gini criterion, max, depth: 20 min, samples\_leaf: 2, min\_samples\_split: 2 & 97.11\% & 0.8256 \\ XGBoost & lr = 0.1, max depth = 3, 100 estimators, gamma: 2, colsample\_bytree: 0.8 & 98.10\% & 0.8658 \\ Random forest & 100 estimators, max\_depth: 20, max\_features: log2, min\_samples\_split: 2 & 98.1\% & 0.9465 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The results of the models after normalizing the vital signs for each participant and considering fatigue states lower than 0.38.  
fully capture the performance of the models on the minority class. To address this issue, we also evaluated the F1-score, which is a more comprehensive measure by considering both precision and recall. As shown in Table 4, while all models exhibit high accuracy, there is significant variation in the F1-scores. Models such as SVC and logistic regression, despite their high accuracy, have relatively low F1-scores (0.4831 and 0.5215, respectively), indicating poorer performance in predicting the minority class. Conversely, models like MLP, decision tree, XGBoost, and random forest demonstrate both high accuracy and high F1-scores, with random forest achieving the highest F1-score, 0.9465. This indicates a better handling of the imbalanced data. The experiments revealed that the threshold of 0.38 yielded the best F1-score, with the random forest model achieving the F1-score of 0.9465 in fatigue prediction based on vital signs. To analyze the effect of feature correlation on classification performance, it is essential to asses the relationship between the input variables. In this context, features exhibiting high correlation include num_eye_closure > 2 s and eye_closure_ratio, as well as rhythmicity_coeff and stability_coef, which were assessed by using Spearman rank correlation coefficient. However, other potential correlations, such as those between head Euler angles (roll, pitch, and yaw) with angles exceeding 30 degrees and the relationship between mouth_openness_ratio and num_yawns, were not captured by the Spearman method. This limitation may arise from the non-monotonic relationship between these variables.