Random-forest and support vector machine algorithm eventually identified ten diagnostic markers (MEF2D, RXRA, PPARA, FOXO1, PPARD, PPP3CB, MAPK14, CREB1, MEF2A, PRMT1) for risk prediction of HF patients, and the proposed nomogram resulted in good predictive performance (GSE66360, AUC = 0.91; GSE59867, AUC = 0.84) and the clinical usefulness in HF patients. Here, MEF2A is linked to hydrops fetalis.