MedBootstrap
Example Usage
Usage example of MedBootstrap within C++ code
An application using MedBootstrap is available here: bootstrap_app
Running Bootstrap with a Custom Measurement Function
Cohorts File Format
The cohorts file can be defined in two ways:
-
Single Cohort per Line
- Format:
COHORT_NAME<TAB>PARAMETERS_DEF COHORT_NAMEis a string for the cohort name.PARAMETERS_DEFis:PARAMETER_NAME:MIN_RANGE,MAX_RANGE;...(parameters separated by;).- The cohort is the intersection (AND) of all parameter ranges. There is a single tab between the name and the definition.
- Example:
This creates a cohort called "1 year back & age 40-80" and filters records with (Time-Window >= 0 and <= 365) and (Age >= 40 and <= 80).
- Format:
-
Multiple Cohorts (Cartesian Product)
- Format:
MULTI<TAB>PARAMETERS_DEF<TAB>...PARAMETERS_DEF<TAB> - A line starting with
MULTIcreates all Cartesian combinations for each parameter definition (each in the next tab). PARAMETERS_DEFis as above.- Example:
This creates 2×3×2=12 cohorts for each combination of Time-Window, Age, and Gender options.
- Format:
Improvement Ideas
- Add support for more complex conditions in MedBootstrap (e.g., AND/OR logic on parameter ranges).
- Enable bootstrap calculation on multiple predictions for the same samples. This would reduce runtime when comparing different models or scores, as currently each call randomizes the bootstrap cohort and samples.