## 5 Experimental Results
### Threshold Optimization Results  
Threshold optimization is a critical step in classification tasks, particularly when dealing with imbalanced datasets or when the cost of false positives and false negatives varies significantly. The goal is to select a decision threshold that maximizes a chosen performance metric, such as the F1 score, while maintaining a balance between precision and recall. Figure 5 shows the results of threshold optimization before using the SMOTE method. The confusion matrix evaluates the model's accuracy (Figure 5b), showing 175,935 true positive predictions and 4966 true negative predictions, with 162 false negatives and 629 false positives. Figure 4: The causal inference model using Direct LiNGAM. (**a**) The causal inference diagram (**b**) Zoom in. Figure 4(a) illustrates the distribution of predicted probabilities for each true class (e.g., class 0 and class 1) as generated by the model. The histogram demonstrates the probabilistic predictions ranging from 0.0 to 0.7, with distinct vertical count axes representing the frequency of predictions for each class. Figure 4(a) shows the separation and overlap of prediction probabilities between the binary classes (labeled 0 and 1), highlighting the model's discriminative capabilities and potential decision boundary challenges. The x-axis represents the predicted probability values (ranging from 0 to 1), while the y-axis shows the count of instances falling within each probability bin. The distribution of predicted probabilities for class 0 instances is concentrated on the left side of the graph (closer to 0.0), indicating that the model assigns low probabilities to these instances. The distribution for class 1 instances is skewed toward the right side of the graph (closer to 1.0), reflecting the model's higher confidence in correctly identifying \"1\" instances. Figure 6 shows the impact of varying classification thresholds (ranging from 0.1 to 0.9) on model performance through multiple complementary representations. Each threshold setting is analyzed using ROC curves, prediction probability distributions, and corresponding confusion matrices. The analysis reveals optimal performance metrics at thresholds between 0.2 and 0.3, achieving macro \(F1\) scores of 0.978. As the threshold increases from 0.1 to 0.9, there is a notable transition in classification behavior, with the most balanced performance observed in the lower threshold range. The prediction probability distributions demonstrate clear class separation, while the ROC curves illustrate the trade-off between true and false positive rates. At higher thresholds (0.8 and 0.9), the model exhibits a complete bias toward the majority class, resulting in degraded \(F1\) scores of 0.492. The confusion matrices quantify these shifts in classification behavior, showing how different threshold values affect the balance between false positives and false negatives across the binary classification task. Figure 5: The model’s classification performance using a confusion matrix and the distribution of prediction probabilities across different true class labels before applying SMOTE. (**a**) The distribution of prediction probabilities. (**b**) The confusion matrix. Figure 6: The ROC curves, distribution of prediction probabilities across different thresholds, and the model’s classification performance using a confusion matrix before SMOTE. The threshold optimization process demonstrates that the range between 0.2 and 0.3 is optimal for achieving the highest \(F1\) score of 0.978. This range ensures a balanced classification performance, minimizes false positives and false negatives, and is robust to class imbalance. The chosen thresholds are validated through cross-validation and comparison with alternative thresholds, confirming their superiority for the given task. The impact of SMOTE on threshold optimization is analyzed in Appendix A, Figure A1. This figure shows the resulting optimal threshold range and corresponding \(F1\) scores.