BackgroundThis study was to conduct prediction models based on parameters before and after the first cycle, respectively, to predict live births in women who received fresh or frozen in vitro fertilization (IVF) or intracytoplasmic sperm injection (ICSI) for the first time.MethodsThis retrospective cohort study population consisted of 1,857 women undergoing the IVF cycle from 2019 to 2021 at Huizhou Municipal Central Hospital. The data between 2019 and 2020 were completely randomly divided into a training set and a validation set (8:2). The data from 2021 was used as the testing set, and the bootstrap validation was carried out by extracting 30% of the data for 200 times on the total data set. In the training set, variables are divided into those before the first cycle and after the first cycle. Then, predictive factors before the first cycle and after the first cycle were screened. Based on the predictive factors, four supervised machine learning algorithms were respectively considered to build the predictive models: logistic regression (LR), random forest (RF), extreme gradient boosting (XGBoost), and light gradient boosting machine (LGBM). The performances of the prediction models were evaluated by the area under the receiver operator characteristic curve (AUC), sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and accuracy.ResultsTotally, 851 women (45.83%) had a live birth. The LGBM model showed a robust performance in predicting live birth before the first cycle, with AUC being 0.678 [95% confidence interval (CI): 0.651 to 0.706] in the training set, 0.612 (95% CI: 0.553 to 0.670) in the validation set, 0.634 (95% CI: 0.511 to 0.758) in the testing set, and 0.670 (95% CI: 0.626 to 0.715) in the bootstrap validation. The AUC value in the training set, validation set, testing set, and bootstrap of LGBM to predict live birth after the first cycle was 0.841 (95% CI: 0.821 to 0.861), 0.816 (95% CI: 0.773 to 0.859), 0.835 (95% CI: 0.743 to 0.926), and 0.839 (95% CI: 0.806 to 0.871), respectively.ConclusionThe LGBM model based on the predictive factors before and after the first cycle for live birth in women showed a good predictive performance. Therefore, it may assist fertility specialists and patients to adjust the appropriate treatment strategy.