Demonstrations of the Goldilocks-DPM framework for data-driven Disease Progression Model configuration.
See goldilocks-pysustain.py for a worked example, but here’s a conceptual overview.
from goldilocks_dpm import goldilocks_ZscoreSustain
X and vector y labelling 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
)
gdpm.run_goldilocks(
plot = True,
plot_format = "png",
verbose = False
)
goldilocks_ZscoreSustain object will now contain the z-scored X data, and goldilocks-suggested pySuStaIn hyperparameters Z_vals and Z_max