PheCAP: High-Throughput Phenotyping with EHR using a Common Automated Pipeline

Yichi Zhang, Chuan Hong, Tianxi CaiOpenalex Unknown 2020 · DOI · OpenAlex

Abstract: PheCAP implements surrogate-assisted feature extraction (SAFE) and common machine learning approaches to train and validate phenotyping models. Background and details about the methods can be found at Zhang et al. (2019), Yu et al. (2017), and Liao et al. (2015).

Introduction

Electronic Health Records (EHR) represent a critical resource for clinical research, yet they present significant challenges due to their high-dimensional, sparse, and largely unlabeled nature. Traditional phenotyping—the process of identifying whether a patient has a specific clinical condition—often relies on manual chart reviews to establish a "gold standard." This manual process is labor-intensive, expensive, and difficult to scale across hundreds of potential diseases.

The PheCAP R package addresses these bottlenecks by providing a standardized, automated pipeline for building high-throughput phenotyping models. By leveraging Surrogate-Assisted Feature Extraction (SAFE), the package enables the development of robust machine learning classifiers even when manual labels are scarce.

Technical Overview

PheCAP is designed to bridge the gap between raw EHR data, such as ICD codes and clinical notes, and validated predictive models. The package architecture integrates several statistical and machine learning libraries to facilitate a seamless workflow from feature extraction to model validation.

PheCAP Package Metadata and Technical Specifications

As shown in the package specifications, PheCAP relies on core R libraries and specialized packages like glmnet for penalized regression and RMySQL for handling large-scale clinical data interfaces. It supports a wide array of modeling techniques, including Support Vector Machines (SVM), Random Forests, and Extreme Gradient Boosting (XGBoost).

Methodology: Surrogate-Assisted Feature Extraction (SAFE)

The core innovation of PheCAP is the implementation of the SAFE workflow, which optimizes the use of limited labeled data by performing feature selection on the broader unlabeled dataset. The process follows four primary stages:

  1. Surrogate Definition: Researchers identify high-confidence indicators (surrogates) for a condition, such as specific ICD-10 codes or NLP-derived mentions in clinical notes.
  2. Automated Feature Selection: Instead of exhausting labeled data for feature selection, PheCAP uses surrogates to identify "extreme" cases and controls within the unlabeled population. It employs subsampling and dropout techniques to identify the most robust features associated with the phenotype.
  3. Model Training: The final classifier is trained on the available labeled data using the selected features. Supported algorithms include standard and penalized Logistic Regression (Ridge, LASSO, Adaptive LASSO), SVM, and ensemble methods.
  4. Validation: The pipeline includes automated tools for calculating ROC curves and Area Under the Curve (AUC) metrics across training sets, random splits, and independent validation cohorts.

Data Handling and Evaluation

To demonstrate the pipeline's efficacy, the package includes a synthetic dataset, ehr_data, consisting of 10,000 patient observations and 588 variables. In this simulation, only 181 patients possess "gold-standard" labels, reflecting the real-world scarcity of manually reviewed data.

PheCAP addresses common EHR data issues, such as right-skewed distributions, by defaulting to a log1p transformation to normalize counts before modeling. Furthermore, the phecap_plot_roc_curves function allows researchers to visualize model performance across different data splits, providing a safeguard against overfitting.

Discussion and Limitations

PheCAP provides a reproducible framework for phenotyping across different hospital systems. However, the pipeline's success is heavily dependent on the quality of the initial surrogates chosen by the researcher. Additionally, while the package facilitates the modeling of NLP data, it assumes that raw text has already been converted into Concept Unique Identifier (CUI) counts, a process that may require external tools and databases like the UMLS.

Despite these requirements, PheCAP represents a significant step forward in making EHR-based research more efficient and scalable, allowing for the rapid development of validated clinical classifiers.

Summary updated

Abstract

Implement surrogate-assisted feature extraction (SAFE) and common machine learning approaches to train and validate phenotyping models. Background and details about the methods can be found at Zhang et al. (2019) &lt;<a href="https://doi.org/10.1038%2Fs41596-019-0227-6" target="_top">doi:10.1038/s41596-019-0227-6</a>&gt;, Yu et al. (2017) &lt;<a href="https://doi.org/10.1093%2Fjamia%2Focw135" target="_top">doi:10.1093/jamia/ocw135</a>&gt;, and Liao et al. (2015) &lt;<a href="https://doi.org/10.1136%2Fbmj.h1885" target="_top">doi:10.1136/bmj.h1885</a>&gt;.
BibTeX
@inproceedings{zhang2020phecap,
  author = {Yichi Zhang and Chuan Hong and Tianxi Cai},
  title = {{PheCAP: High-Throughput Phenotyping with EHR using a Common Automated Pipeline}},
  booktitle = {Openalex Unknown},
  year = {2020},
  doi = {10.32614/cran.package.phecap},
}
Figure