Develop Clinical Prediction Models Using the Common Data Model
Calculate the average precision
brierScore
Calculate the calibration in large
calibrationLine
Compute the area under the ROC curve
Computes grid performance with a specified performance function
Sets up a python environment to use for PLP (can be conda or venv)
covariateSummary
Extracts covariates based on cohorts
Create a setting that holds the details about the cdmDatabase connecti...
Create the PatientLevelPrediction database result schema settings
Creates default list of settings specifying what parts of runPlp to ex...
Create the settings for defining how the plpData are split into test/v...
Creates list of settings specifying what parts of runPlp to execute
Create the settings for defining how the plpData are split into test/v...
Create the settings for defining any feature engineering that will be ...
createGlmModel
Create Iterative Imputer settings
createLearningCurve
Create the settings for logging the progression of the analysis
Specify settings for developing a single model
Create the settings for normalizing the data @param type The type of n...
Create the results tables to store PatientLevelPrediction models and r...
Create the settings for preprocessing the trainData.
Create the settings for random foreat based feature selection
Create the settings for removing rare features
createRestrictPlpDataSettings define extra restriction settings when c...
Create the settings for defining how the trainData from splitData ar...
Create Simple Imputer settings
Plug an existing scikit learn python model into the PLP framework
Create the settings for adding a spline for continuous variables
Create the settings for using stratified imputation.
Create a study population
create the study population settings
Create a temporary model location
Create the settings for defining any feature selection that will be do...
createValidationDesign - Define the validation design for external val...
createValidationSettings define optional settings for performing exter...
Run a list of predictions diagnoses
diagnostic - Investigates the prediction problem settings - use before...
evaluatePlp
externalValidateDbPlp - Validate a model on new databases
Exports all the results from a database into csv files
fitPlp
Get a sparse summary of the calibration
Extracts covariates based on cohorts
Get a demographic summary
Create a plpData object from the Eunomia database'
Extract the patient level prediction data from the server
Calculates the prediction distribution
Calculates the prediction distribution
Calculate all measures for sparse ROC
Calculate the Integrated Calibration Index from Austin and Steyerberg ...
Function to insert results into a database from csvs
Create sqlite database with the results
Imputation
join two lists
Cartesian product
Load the multiple prediction json settings from a file
Load the plpData from a folder
loads the plp model
Loads the evalaution dataframe
Loads the plp result saved as json/csv files for transparent sharing
Loads the prediction dataframe to json
Map covariate and row Ids so they start from 1
Migrate Data model
A function that normalizes continous features to have values between 0...
Calculate the model-based concordance, which is a calculation of the e...
Plot the outcome incidence over time
PatientLevelPrediction
Permutation Feature Importance
Plot the Observed vs. expected incidence, by age and gender
Plot the F1 measure efficiency frontier using the sparse thresholdSumm...
Plot the train/test generalizability diagnostic
plotLearningCurve
Plot the net benefit
Plot all the PatientLevelPrediction plots
Plot the precision-recall curve using the sparse thresholdSummary data...
Plot the Predicted probability density function, showing prediction ov...
Plot the side-by-side boxplots of prediction distribution, by class
Plot the preference score probability density function, showing predic...
Plot the smooth calibration as detailed in Calster et al. "A calibrati...
Plot the calibration
Plot the conventional calibration
Plot the ROC curve using the sparse thresholdSummary data frame
Plot the variable importance scatterplot
Predictive mean matching using lasso
Create predictive probabilities
predict using a logistic regression model
predictPlp
A function that wraps around FeatureExtraction::tidyCovariateData to n...
Print a plpData object
Print a summary.plpData object
recalibratePlp
recalibratePlpRefit
A function that removes rare features from the data
A function that normalizes continous by the interquartile range and op...
Run a list of predictions analyses
runPlp - Develop and internally evaluate a model using specified setti...
Save the modelDesignList to a json file
Save the plpData to folder
Saves the plp model
Saves the result from runPlp into the location directory
Save the plp result as json files and csv files for transparent sharin...
Saves the prediction dataframe to a json file
Create setting for AdaBoost with python DecisionTreeClassifier base es...
Create setting for lasso Cox model
Create setting for the scikit-learn DecisionTree with python
Create setting for gradient boosting machine model using gbm_xgboost i...
Create setting for Iterative Hard Thresholding model
Create modelSettings for lasso logistic regression
Create setting for gradient boosting machine model using lightGBM (htt...
Create setting for neural network model with python's scikit-learn. Fo...
Create setting for naive bayes model with python
Use the python environment created using configurePython()
Create setting for random forest model using sklearn
Create setting for the python sklearn SVM (SVC function)
Simple Imputation
Generate simulated data
Loads sklearn python model from json
Saves sklearn python model object to json in path
Split the plpData into test/train sets using a splitting settings of c...
Summarize a plpData object
Convert the plpData in COO format into a sparse R matrix
validateExternal - Validate model performance on new data
externally validate the multiple plp models across new datasets
open a local shiny app for viewing the result of a PLP analyses from a...
open a local shiny app for viewing the result of a multiple PLP analys...
viewPlp - Interactively view the performance and model settings
A user friendly way to create patient level prediction models using the Observational Medical Outcomes Partnership Common Data Model. Given a cohort of interest and an outcome of interest, the package can use data in the Common Data Model to build a large set of features. These features can then be used to fit a predictive model with a number of machine learning algorithms. This is further described in Reps (2017) <doi:10.1093/jamia/ocy032>.
Useful links