|
| 1 | +# Goldilocks DPM |
| 2 | + |
| 3 | +A Disease Progression Modelling (DPM) implementation of the Goldilocks framework for data-driven model configuration. |
| 4 | + |
| 5 | +Goldilocks (conference paper: [Oxtoby, AAIC 2024](https://doi.org/10.1002/alz.092363)) is a framework for helping users ensure that their data-driven model of choice is configured "just right" for the available data. Conceptually, Goldilocks informs on feature selection and hyperparameter tuning, with respect to signal in the data. This complements work in the field of explainable AI. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## Contents |
| 10 | + |
| 11 | +1. [goldilocks\_dpm](goldilocks_dpm): python module for implementing the Goldilocks framework within data-driven DPM. |
| 12 | + 1. [demos](goldilocks_dpm/demos): folder containing demo implementations of various DPMs. |
| 13 | + 1. [README](goldilocks_dpm/demos/README.md): describes the `goldilocks-dpm` workflow |
| 14 | + 1. [goldilocks-pysustain.py](goldilocks_dpm/demos/goldilocks-pysustain.py): **Su**btype and **Sta**ge **In**ference |
| 15 | + 1. Calls [plot\_SuStaIn\_model\_arbitrarycolours.py](goldilocks_dpm/demos/plot_SuStaIn_model_arbitrarycolours.py) which demos how to use arbitrary colours in SuStaIn model plotting (thanks to Alex Young for help with this). |
| 16 | + 1. **TODO**. [goldilocks\_ebm.py](): Event-Based Model (GMM, KDE, Ordinal Scored Events) |
| 17 | +1. [ADNIMERGE2023_synthetic.csv](goldilocks_dpm/demos/ADNIMERGE2023_synthetic.csv): Data mimicking [ADNI](https://adni.loni.usc.edu) data based on ADNIMERGE.csv downloaded in May 2023. |
| 18 | + 1. [synthetic_data.ipynb](goldilocks_dpm/demos/synthetic_data.ipynb): Jupyter notebook for generating the above, FYI (don't try to run it unless you have an ADNIMERGE CSV to feed into it). |
| 19 | + |
| 20 | + |
| 21 | +## Workflow |
| 22 | + |
| 23 | +See [goldilocks-pysustain.py](goldilocks_dpm/demos/goldilocks-pysustain.py) for a worked example using ZScoreSustain. |
| 24 | + |
| 25 | +``` |
| 26 | +## 1. Prepare your data |
| 27 | +
|
| 28 | +## 2. Create a Goldilocks DPM object and run the framework |
| 29 | +
|
| 30 | +## ZScoreSuStaIn |
| 31 | +from goldilocks_dpm import goldilocks_ZscoreSustain |
| 32 | +
|
| 33 | +gdpm = goldilocks_ZscoreSustain( |
| 34 | + classes = y, |
| 35 | + dpmData = X, |
| 36 | + output_folder = "path/to/output_folder", |
| 37 | + robust_zscores = False, |
| 38 | + case_label = 1, |
| 39 | + ctrl_label = 0, |
| 40 | + direction_abnormal = direction_abnormal, |
| 41 | + biomarker_labels = biomarkers |
| 42 | +) |
| 43 | +
|
| 44 | +gdpm.run_goldilocks() |
| 45 | +
|
| 46 | +## 3. Interrogate the resulting output. |
| 47 | +print(gdpm.Z_vals) |
| 48 | +print(gdpm.Z_max) |
| 49 | +
|
| 50 | +``` |
| 51 | + |
| 52 | +## Licence |
| 53 | + |
| 54 | +MIT. |
0 commit comments