Demonstrations of the Goldilocks-DPM framework for data-driven Disease Progression Model configuration.
- goldilocks-pysustain.py: Subtype and Stage Inference (Young et al., Nature Communications 2018)
- Future feature (TODO): goldilocks-ebm.py: Event-Based Model (Fonteijn, et al., NeuroImage 2012)
See goldilocks-pysustain.py for a worked example, but here's a conceptual overview.
- Import the module:
from goldilocks_dpm import goldilocks_ZscoreSustain
- Prepare your data.
- SuStaIn: see examples in pySuStaIn for inspiration and guidance.
- EBM: see kde_ebm and disease-progression-modelling.github.io for inspiration and guidance.
- Create a goldilocks ZScoreSustaIn object including your data matrix
Xand vectorylabelling cases and controls (controls are used to z-score your data):
output_folder = Path.cwd() # or wherever you want the output to go
gdpm = goldilocks_ZscoreSustain(
dpmData = X,
classes = y,
output_folder = output_folder,
robust_zscores = False,
case_label = 1,
ctrl_label = 0,
direction_abnormal = direction_abnormal,
biomarker_labels = biomarkers
)
- Run the goldilocks zone calculation
gdpm.run_goldilocks(
plot = True,
plot_format = "png",
verbose = False
)
- Your
goldilocks_ZscoreSustainobject will now contain the z-scored X data, and goldilocks-suggested pySuStaIn hyperparametersZ_valsandZ_max