Study Question: Can a machine-learning-based model trained in clinical and biological variables support the prediction of the presence or absence of sperm in testicular biopsy in non-obstructive azoospermia (NOA) patients?, Summary Answer: Our machine-learning model was able to accurately predict (AUC of 0.8) the presence or absence of spermatozoa in patients with NOA., What Is Known Already: Patients with NOA can conceive with their own biological gametes using ICSI in combination with successful testicular sperm extraction (TESE). Testicular sperm retrieval is successful in up to 50% of men with NOA. However, to the best of our knowledge, there is no existing model that can accurately predict the success of sperm retrieval in TESE. Moreover, machine-learning has never been used for this purpose., Study Design, Size, Duration: A retrospective cohort study of 119 patients who underwent TESE in a single IVF unit between 1995 and 2017 was conducted. All patients with NOA who underwent TESE during their fertility treatments were included. The development of gradient-boosted trees (GBTs) aimed to predict the presence or absence of spermatozoa in patients with NOA. The accuracy of these GBTs was then compared to a similar multivariate logistic regression model (MvLRM)., Participants/materials, Setting, Methods: We employed univariate and multivariate binary logistic regression models to predict the probability of successful TESE using a dataset from a retrospective cohort. In addition, we examined various ensemble machine-learning models (GBT and random forest) and evaluated their predictive performance using the leave-one-out cross-validation procedure. A cutoff value for successful/unsuccessful TESE was calculated with receiver operating characteristic (ROC) curve analysis., Main Results and the Role of Chance: ROC analysis resulted in an AUC of 0.807 ± 0.032 (95% CI 0.743-0.871) for the proposed GBTs and 0.75 ± 0.052 (95% CI 0.65-0.85) for the MvLRM for the prediction of presence or absence of spermatozoa in patients with NOA. The GBT approach and the MvLRM yielded a sensitivity of 91% vs. 97%, respectively, but the GBT approach has a specificity of 51% compared with 25% for the MvLRM. A total of 78 (65.3%) men with NOA experienced successful TESE. FSH, LH, testosterone, semen volume, age, BMI, ethnicity and testicular size on clinical evaluation were included in these models., Limitations, Reasons for Caution: This study is a retrospective cohort study, with all the associated inherent biases of such studies. This model was used only for TESE, since micro-TESE is not performed at our center., Wider Implications of the Findings: Machine-learning models may lay the foundation for a decision support system for clinicians together with their NOA patients concerning TESE. The findings of this study should be confirmed with further larger and prospective studies., Study Funding/competing Interest(s): The study was funded by the Division of Obstetrics and Gynecology, Soroka University Medical Center, there are no potential conflicts of interest for all authors., (© The Author(s) 2020. Published by Oxford University Press on behalf of European Society of Human Reproduction and Embryology. All rights reserved. For permissions, please email: journals.permissions@oup.com.)