summary.ehr2pheno: Summarize a phenotype prediction

View source: R/summary.ehr2pheno.R

summary.ehr2phenoR Documentation

Summarize a phenotype prediction

Description

Summarize a phenotype prediction from diagnosis codes and NLP processed notes

Usage

## S3 method for class 'ehr2pheno'
summary(object, goldstandard = NULL, ...)

Arguments

object

An object of class "ehr2pheno"

goldstandard

a binary vector containing the gold-standard phenotypes

...

Arguments to be passed to or from other methods

Details

Computes the True Positives Rate (TPR), False Positives Rate (FPR), and Area Under the ROC Curve (AUC).

WARNING: the criteria are computed on the training data itself and are therefore over-optimistic !

Value

an object of class "summary.ehr2pheno" with the following elements:

  • criteria:

    • AUC: a vector of length 3 containing the AUC on the training data for codes only, nlp only, and both codes and nlp.

    • TPR: a matrix of 3 columns the TPR for each threshold on the training data for codes only, nlp only, and both codes and nlp.

    • FPR: a matrix of 3 columns the FPR for each threshold on the training data for codes only, nlp only, and both codes and nlp.

  • pred_proba: a list with the predicted probabilities for each of the three models with codes, nlp and both

  • pred_proba: a list with the selected features and associated odds ratios for each of the three logistic regression models with elastic-net codes, nlp and both

See Also

ehr2pheno


borishejblum/phenotypr documentation built on May 2, 2022, 11:04 p.m.