The Model Parameters Pipeline is an R package for applying transformations to data according to the Model Parameters specification developed by Big Life Lab. This package implements a pipeline for sequential data transformations including centering, dummy coding, interactions, restricted cubic splines (RCS), and logistic regression.
Overview
This package provides tools to transform input data using model parameters exported from predictive algorithms. It follows the Model Parameters specification used by Big Life Lab’s predictive models such as HTNPoRT (Hypertension Population Risk Tool), DemPoRT (Dementia Population Risk Tool), CVDPoRT (Cardiovascular Disease Population Risk Tool), and MPoRT (Mortality Population Risk Tool).
Supported Transformations
The pipeline supports the following transformation steps:
- Center: Centers variables by subtracting a specified value
- Dummy: Creates dummy variables for categorical values
- Interaction: Creates interaction terms by multiplying variables
- RCS: Applies restricted cubic spline transformations
- Logistic Regression: Applies logistic regression with coefficients
Adding New Transformation Steps
For instructions on implementing additional transformation steps, see Adding a New Transformation Step.
Installation
Prerequisites
- R (>= 4.1)
- Required packages:
stringr(>= 1.6.0) - Suggested packages:
testthat(>= 3.0.0),devtools(>= 2.4.5)
Install from Source
# Install devtools if not already installed
install.packages("devtools")
# Install from local source
devtools::install_local("/path/to/model-parameters-pipeline")
# Or install from GitHub (if published)
# devtools::install_github("Big-Life-Lab/model-parameters-pipeline")Usage
For usage details and examples, view the documentation at Introduction to Model Parameters Pipeline.
Model Parameters Specification
This package implements transformations according to the Model Parameters specification used by Big Life Lab. The specification defines how predictive algorithms store and apply parameter transformations in a standardized CSV format, enabling:
- Transparent algorithm reporting
- Easy deployment across platforms
- Reproducible transformations
- Language-agnostic implementation
For more information about the Model Parameters specification and Big Life Lab’s predictive models, visit:
Contributing
Bug reports and feature requests can be submitted to the issue tracker.