Identification of Erectile Dysfunction From Routine Blood Test Data: Development and Validation of a Machine Learning-Based Prediction Model

Background Erectile dysfunction (ED) is a prevalent male health disorder and a recognized sentinel marker for cardiovascular disease. Current diagnostic reliance on subjective questionnaires or invasive examinations limits early screening. Aim We aimed to develop and validate a machine learning model based on routine blood test data to predict ED risk to facilitate its early clinical screening. Methods Data from 4116 men in the NHANES database (2001-2004) formed the training/internal validation sets. An independ…

Identification of Erectile Dysfunction From Routine Blood Test Data: Development and Validation of a Machine Learning-Based Prediction Model
378th EMDS hosts Walking Blood Bank Pre-screening (9006793) by U.S. Air Force photo by Senior Airman Kevin Dunkleberger. Public domain

In brief

Researchers developed and validated a machine learning model to predict erectile dysfunction risk from routine blood test data, using 4116 NHANES participants for training and internal validation and 489 NPTR-confirmed patients for independent external validation. The random forest model achieved the best results in external validation.

The work matters because ED is described as a prevalent disorder and sentinel marker for cardiovascular disease, yet current diagnosis relies on subjective questionnaires or invasive exams. A blood-based screening tool could shift detection earlier in primary care, but real-world adoption, generalizability beyond the studied cohorts, and clinical workflow integration remain unproven.

Main points

  1. Training data included 4116 men from NHANES 2001-2004 with internal validation, plus 489 clinical patients with NPTR-confirmed ED for external validation.
  2. From 49 initial indicators, nine key predictors were selected via univariate logistic, multivariate logistic, and LASSO regression.
  3. Seven models were optimized via grid search with fivefold cross-validation and evaluated with ROC analysis, calibration curves, and decision curve analysis.
  4. SHAP analysis identified age, sex hormone-binding globulin (SHBG), testosterone, glucose, cholesterol, and creatinine as most influential predictors.

The gain

A random forest model using nine routine blood-based predictors can screen for erectile dysfunction risk with high external validation performance, enabling early non-invasive detection during health check-ups.

The rundown

The study started with 49 demographic and blood-based indicators and narrowed to nine predictors using three selection methods. Seven machine learning models were built and tuned with grid search and fivefold cross-validation, then compared using ROC, calibration, and decision curve analysis.

The random forest model outperformed logistic regression, which had AUC = 0.743, and was interpreted via SHAP to rank predictor importance. Authors frame the nine-feature panel as suitable for routine health examinations to support precision management.

Sources

  1. Peer-reviewedAndrology2026-08-14

The debate