Background: Early onset of type 2 diabetes and cardiovascular disease are common complications for women diagnosed with gestational diabetes. About half of the women with gestational diabetes develop postpartum prediabetes within 10 years of the index pregnancy. These women also have double the risk of developing cardiovascular disease than women without a history of gestational diabetes. Currently, there is no accurate way of knowing which women with gestational diabetes are likely to develop postpartum prediabetes. This study aims to predict the risk of postpartum prediabetes in women diagnosed with gestational diabetes. Methods: We build a sparse logistic regression-based machine learning model to learn key variables significant for the prediction of postpartum prediabetes, from antenatal data with maternal anthropometric and biochemical variables as well as neonatal characteristics of 607 UK women diagnosed with gestational diabetes. We evaluate the performance of the proposed model in addition to other more advanced machine learning methods using established metrics such as the area under the receiver operating characteristic curve and specificity for pre-determined values of sensitivity. We use K-L divergence and information graphs to evaluate and compare different thresholds of classification for targeted screening options in resource-constrained settings. We also perform a decision curve analysis to study the net standardized benefit of our model compared to the universal screening approach. Results: Strikingly, our sparse logistic regression approach selects only two variables as relevant but gives an area under the receiver operating characteristic curve of 0.72, outperforming all other methods. It can identify postpartum prediabetes in women with gestational diabetes using the Rule-in test with 92\% specificity at an optimal probability threshold of 0.381 and using the Rule-out test with 92\% sensitivity at an optimal probability threshold of 0.140. Conclusion: We propose a simple logistic regression model, which needs only the antenatal fasting glucose at OGTT and HbA1c soon after the diagnosis of GDM, to predict, with remarkable accuracy, the probability of postpartum prediabetes in women with gestational diabetes. We envision this to be a practical solution, which coupled with a targeted follow-up of high-risk women, could yield better cardiometabolic outcomes in women with a history of GDM.