IntroductionUnilateral primary aldosteronism (UPA) and bilateral primary aldosteronism (BPA) are the two subtypes of PA. Discriminating UPA from BPA is of great significance. Although adrenal venous sampling (AVS) is the gold standard for diagnosis, it has shortcomings. Thus, improved methods are needed.MethodsThe original data were extracted from the public database “Dryad”. Ten parameters were included to develop prediction models for PA subtype diagnosis using machine learning technology. Moreover, the optimal model was chose and validated in an external dataset.ResultsIn the modeling dataset, 165 patients (71 UPA, 94 BPA) were included, while in the external dataset, 43 consecutive patients (20 UPA, 23 BPA) were included. The ten parameters utilized in the prediction model include age, sex, systolic and diastolic blood pressure, aldosterone to renin ratio (ARR), serum potassium, ARR after 50 mg captopril challenge test (CCT), primary aldosterone concentration (PAC) after saline infusion test (SIT), PAC reduction rate after SIT, and number of types of antihypertensive agents at diagnosis. The accuracy, sensitivity, specificity, F1 score, and AUC for the optimal model using the random forest classifier were 90.0%, 81.8%, 96.4%, 0.878, and 0.938, respectively, in the testing dataset and 81.4%, 90.0%, 73.9%, 0.818 and 0.887, respectively, in the validating external dataset. The most important variables contributing to the prediction model were PAC after SIT, ARR, and ARR after CCT.DiscussionWe developed a machine learning-based predictive model for PA subtype diagnosis based on ten clinical parameters without CT imaging. In the future, artificial intelligence-based prediction models might become a robust prediction tool for PA subtype diagnosis, thereby, might reducing at least some of the requests for CT or AVS and assisting clinical decision-making.