## 4 Discussion  
The early detection of Down syndrome during pregnancy is crucial for parents and healthcare professionals, enabling them to prepare for appropriate care and management of the condition. Machine learning algorithms have been increasingly explored for first-trimester Down syndrome screening, utilizing various diagnostic methods, including maternal serum screening, ultrasound screening, and non-invasive prenatal testing (NIPT). Numerous studies indicate that machine learning algorithms, such as support vector machines (SVMs), random forests, and logistic regression, can effectively predict the risk of Down syndrome with high accuracy, sensitivity, and specificity. However, it is essential to acknowledge that while machine learning models offer valuable decision support, they are tools to aid, not replace, expert medical judgment. The final diagnosis and clinical decision-making must always remain the responsibility of qualified medical professionals. The models' output should be interpreted as a risk assessment that physicians use in conjunction with other clinical findings, patient history, and their expertise to guide decisions about further testing or patient management. For example, model-derived risk assessments can help prioritize patients for invasive procedures like amniocentesis or chorionic villus sampling; however, the decision to perform such procedures must be made by a physician in consultation with the patient, carefully weighing individual circumstances and potential risks and benefits. In this study, the selection of a single superior model is challenging due to the very similar performance metrics across all models. In such cases, the expertise and needs of clinicians become paramount in the decision-making process. Given the unbalanced nature of the problem, accurate identification of positive cases is critical. Even a modest 1% improvement in the hit rate could significantly impact clinical practice. To illustrate, in Spain, with approximately 337,380 births annually, a 1% improvement would translate to identifying roughly 3374 additional cases per year. This improved detection has substantial implications for social, healthcare, and economic considerations. The XGBoost model, using the threshold determined by the gmeans method, was chosen in this study for its optimal balance of sensitivity (0.943) and specificity (0.939), along with a high ROC-AUC value of 0.982. The performance achieved in this study surpasses that of previous research, including [PERSON] et al. [18] and [PERSON] et al. [19], which reported lower ROC-AUC values. This improvement can be largely attributed to the hyperparameter optimization implemented in the current study, which employed an algorithm based on genetic optimization. Figure 8: XGBoost confusion matrix for gmeans threshold on the test partition. Unlike previous studies that trained their models using a limited set of predetermined hyperparameter values, our approach involved a more extensive, joint optimization. Furthermore, this study benefits from a substantially larger sample size (90,532 samples) compared to [PERSON] et al. (1850 samples, including 239 positive cases) [18] and [PERSON] et al. (58,972 samples, with only 27 positive cases) [16]. It is also important to consider the performance of traditional screening methods as a baseline. Traditional first-trimester screening, combining maternal age, nuchal translucency, and biochemical markers (PAPP-A and \(\beta\)-hCG), typically achieves a detection rate of approximately 85-90% for trisomy 21, with a false-positive rate of around 5%. While our machine learning models demonstrate comparable or slightly improved overall accuracy (as indicated by ROC-AUC), they offer the potential for more nuanced risk stratification and potentially reduced false-positive rates through optimized thresholds and personalized modeling. This highlights a key advantage of machine learning: the ability to move beyond fixed thresholds and incorporate more complex relationships between variables to refine risk prediction.