Back
Healthcare & Clinical

A Machine-Learning Screening Model for Pulmonary Hypertension from Routine Medical Records

How Pfactorial Technologies built and externally validated a machine-learning model that flags likely Pulmonary Hypertension cases from EMR data alone, with and without invasive test results.

August 21, 2026
Share
ENGAGEMENT SNAPSHOT

Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 1
Figure 1 - Key figures from this engagement, at a glance.
EXECUTIVE SUMMARY
Pulmonary Hypertension (PH) is diagnostically challenging because its gold-standard test - right heart catheterization - is invasive and resource-intensive, leaving many patients without a timely diagnosis in resource-limited settings.
Our client wanted a scalable, cost-effective way to identify likely PH cases directly from electronic medical records, but 9,104 patient records with 37 candidate variables meant confronting incomplete data head-on: only 19 of those variables were consistently available for every patient.
Pfactorial built and benchmarked eight machine-learning approaches, using a systematic missing-data handling scheme, and delivered two validated model variants - a full model using all available data, and a No-RHC model built specifically for settings without access to invasive testing - both confirmed on an independent external dataset.
Why this engagement is representative This engagement demonstrates Pfactorial's ability to build a predictive model that stays useful under real-world constraints - incomplete data, resource-limited settings, and the requirement to prove itself outside its own training data.
THE CHALLENGE
Building a model that could actually extend PH screening into resource-limited settings meant solving four distinct problems.

1. The gold-standard test is invasive and not always available

Right heart catheterization is accurate but resource-intensive - exactly the access barrier the model needed to work around to be useful in practice.

2. Real-world EMR data is incomplete by nature

Of 37 candidate variables, only 19 were consistently available for every patient; the rest were missing for some fraction of the 9,104-record cohort.

3. A model that only works with complete records isn't deployable

Most real patients have gaps in their data, so a model trained only on “perfect” records would be nearly useless in a real clinical setting.

4. A model has to prove itself outside its own training data

Strong performance on the data it was built from means little if it doesn't hold up on an independent dataset from a different institution.
The real brief Not “train a classifier on the full dataset” but “build a model that still works when the data is incomplete or when invasive test results simply aren't available.”
THE SOLUTION
Pfactorial built two model variants around a systematic missing-data handling scheme, benchmarked eight algorithms under an identical evaluation framework, and validated both on an independent external dataset.
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 2
Figure 2 - From 9,104 EMR records to two externally validated screening models.

Architectural principles

  • Two models, two use cases - A full model using all available data, including invasive RHC-derived measures, and a No-RHC model built specifically for resource-limited settings without access to invasive testing.
  • Handle missing data by design - Variables were split into “complete case” and “shuffle” columns, with a systematic shuffling scheme used to build robust feature-selected subsets despite partial missingness, rather than dropping incomplete records outright.
  • Benchmark broadly before committing - Eight algorithms, from XGBoost to neural networks, were trained and compared under an identical cross-validation framework, so the final model choice was evidence-based rather than a default pick.
  • External validation is not optional - The selected model was tested against an independent dataset from a separate institution, not just held-out data from the same source.
CAPABILITIES DELIVERED
Each deliverable addresses a specific constraint on real-world deployment, not just internal accuracy.
CAPABILITY
WHAT IT DOES
Feature selection
Adaptive Elastic Net across 37 candidate demographic, clinical and comorbidity variables.
Missing-data handling
A complete-case / shuffle-column scheme that preserves patients with partial records.
Two production model variants
A full model using RHC-derived features, and a No-RHC model for non-invasive-only settings.
Eight-algorithm benchmark
Head-to-head comparison under a shared 10-fold cross-validation framework.
External validation
Both model variants re-tested on an independent dataset from a separate institution.
Full performance reporting
Accuracy, AUC, sensitivity, specificity, PPV and NPV documented for every model variant.
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 3
Figure 3 - A full model for complete data, and a No-RHC model for resource-limited settings.
Design note The No-RHC model matters more than the full model for real-world impact. A model that only works when a patient has already had an invasive catheterization doesn't close the diagnostic gap - it just confirms what a specialist already suspected.
ENGINEERING FOR SCALE AND RELIABILITY
Six methodological decisions keep the models honest about how they'll perform once deployed outside the training data.

Adaptive Elastic Net feature selection

Balances predictive power against the number of variables retained, across 37 candidate demographic, clinical and comorbidity features.

Systematic missing-data handling

A complete-case/shuffle-column scheme, rather than blanket imputation or exclusion, preserves usable signal from patients with partial records.

Grid-searched hyperparameter tuning

A 20x20 alpha/lambda grid search optimized the elastic net stage's regularization and lasso/ridge mixing parameters.

Shared cross-validation framework

A 10-fold cross-validation framework with a 70/30 train-validation split was applied identically across all eight algorithms for a fair comparison.

FDR-adjusted variable significance

Q-values with false discovery rate adjustment were applied to regression-based model variables to control for multiple comparisons.

Independent external validation

Both the full and No-RHC models were tested on a dataset from a separate institution, not just internal held-out data, to confirm real-world generalizability.
DELIVERY APPROACH
The engagement moved from variable inventory through to two externally validated, deployable model variants.
1. Variable inventory & feature-selection design - cataloging 37 candidate variables and applying Adaptive Elastic Net to identify the strongest predictors.
2. Missing-data handling strategy - designing the complete-case/shuffle-column scheme to preserve patients with partial records.
3. Model development across 8 algorithms - training and evaluating XGBoost, GBM, GLMnet, KNN, Random Forest, SVM, Lasso/Ridge and a neural network.
4. Full-model tuning & selection - hyperparameter optimization and final model selection using all available features.
5. No-RHC model variant - rebuilding the pipeline excluding invasive-test-derived features for non-invasive-only settings.
6. External validation & reporting - testing both model variants on an independent dataset and documenting full performance metrics.
RESULTS AND IMPACT

Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 4
Figure 4 - Key outcomes from this engagement.
The full model achieved an internal AUC of 0.973; the No-RHC model, built for settings without invasive testing, still achieved an AUC of 0.89 internally and 0.889 on external validation.
Both models degrade gracefully rather than failing outright when invasive diagnostic data isn't available, giving the client a screening tool viable across both resource-rich and resource-limited settings.

What it enabled commercially

The client now has a validated, externally-tested screening tool that can flag likely PH cases from data most clinics already collect, extending PH screening capability into resource-limited settings that couldn't previously support it.
WHY PFACTORIAL
This engagement reflects Pfactorial's applied clinical predictive-modeling service line: models designed and validated for the messy, incomplete data real healthcare systems actually produce, not just clean benchmark datasets.
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 5
Figure 5 - Service lines this engagement draws on.
Engagement enquiries Pfactorial Technologies works with health systems and research partners that need predictive models validated for real-world, incomplete data. If you're evaluating a clinical screening or predictive-modeling initiative, we're happy to give you an honest read on scope and risk before anyone commits to anything. · pfactorial.ai
APPENDIX A - TECHNOLOGY STACK
The technology stack underpinning the system, grouped by the layer it serves.
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 6
© 2026 Pfactorial Technologies. Client identity and product-specific implementation detail are withheld or generalized; no client data, credentials, source code, or infrastructure detail is included in this document.

Result and Analysis

ENGAGEMENT SNAPSHOT

How Pfactorial Technologies built and externally validated a machine-learning model that flags likely Pulmonary Hypertension cases from EMR data alone, with and without invasive test results.

Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 1
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 2
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 3
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 4
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 5
Pfactorial_Case_Study_Risk_Model_Pulmonary_Hypertension image 6