PatientLevelPrediction

repository·main·Indexed 42 days ago

https://github.com/ohdsi/patientlevelprediction

An R package for building and validating patient-level predictive models using OMOP Common Data Model (CDM) data. It provides a standardized framework for defining prediction problems, extracting covariates, and applying machine learning algorithms—such as Random Forest, GBM, and regularized logistic regression—to observational healthcare data. Includes tools for external validation, performance plotting, and a Shiny app for result exploration.

Tokens
771
Snippets
0
Records
3
Agent score
3%

What's inside PatientLevelPrediction

  1. Overview of PatientLevelPrediction

    main

    PatientLevelPrediction is an R package designed for building and validating patient-level predictive models using data in the OMOP Common Data Model (CDM) format.

    It addresses the prediction problem where, for a population at risk, the goal is to predict which patients at a specific moment in time ($t=0$) will experience a defined outcome during a specified time-at-risk (TAR). The prediction is based solely on patient information collected during an observation window prior to $t=0$.

    Key capabilities include:

    • Developing models for multiple combinations of Target Cohorts (T) and Outcome Cohorts (O).
    • Extracting data for multiple covariate settings from OMOP CDM databases.
    • Utilizing a wide range of covariates (drugs, diagnoses, procedures, age, comorbidity indexes, etc.).
    • Supporting various machine learning algorithms (Regularized logistic regression, Random forest, GBM, etc.) and allowing for custom algorithms, feature engineering, and sampling.
    • Providing tools for external validation, performance plotting (ROC and Calibration), and learning curves.
    • Offering a Shiny app for interactive exploration of results and report generation.
  2. Getting Started with PatientLevelPrediction

    main

    Follow these resources to begin using the package:

    1. Installation: Refer to the Package Installation guide.
    2. Core Workflow: Read the main vignette: Building Single Patient-Level Predictive Models.
    3. Advanced Usage:
    4. Specialized Modeling:
    5. Reference: For a full list of functions, see the Package Reference.
  3. System Requirements for PatientLevelPrediction

    main

    To use PatientLevelPrediction, ensure your environment meets the following requirements:

    • R: Version 4.0 or higher.
    • Windows Users: Requires RTools.
    • Java: Required for various library dependencies.
    • Python: Required for some machine learning algorithms.

    Python Management:

    • The package uses reticulate to manage Python. By default, it uses uv to manage the environment automatically.
    • Offline Environments: If you are working offline, you must manage Python manually and set the RETICULATE_PYTHON environment variable to point to your Python binary. You must ensure scikit-learn is installed in that environment.