| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- # Pipline Scenario to run
- # "scen_train_all" - Train, evaluate (test+val), noise, combine, analyze
- # "scen_load_all" - Load, evaluate (test+val), noise, combine, analyze
- # "scen_load_eval" - Load, evaluate (test+val), combine, analyze (no noise)
- # "scen_analyze" - Analyze existing evaluation files only (no training/eval)
- # "scen_kfold" - Patient-grouped k-fold CV: train+eval per fold, then OOF + analyze
- scenario = "scen_kfold"
- [run]
- # Script/automation options. Leave both false for normal interactive use.
- autorun = false # start the pipeline automatically once the config loads
- autoquit = false # exit the app when the pipeline finishes (0/1 return code)
- # In autorun, allow overwriting PROTECTED outputs (models/evaluations) without a
- # prompt. Not needed for "scen_analyze", which only writes regeneratable analysis
- # artifacts and therefore never triggers the overwrite guard.
- force_overwrite = false
- [data]
- mri_files_path = "../data/PET_volumes_customtemplate_float32/"
- xls_file_path = "../data/LP_ADNIMERGE.csv"
- seed = 42
- data_splits = [0.7, 0.2, 0.1] # train, validation, test
- image_channels = 1
- clin_data_channels = 2
- num_classes = 2 # AD, NL
- [training]
- device = "cuda:0" # "cpu", "cuda", "mps"
- batch_size = 32
- ensemble_size = 30
- droprate = 0.05
- learning_rate = 0.0001
- num_epochs = 25
- deterministic = false # force deterministic cuDNN kernels (slower, exact reproduction)
- [evaluation]
- # Gaussian noise applied to images during noisy evaluation (step 6).
- #
- # With noise_relative = true (below) each sigma is a FRACTION OF THAT IMAGE'S own
- # intensity standard deviation: sigma = 1.0 means the added noise is as strong as
- # the image's signal variation (SNR ~ 1), and sigma = 8.0 is essentially pure
- # noise. This scaling is required here because the PET volumes are unnormalised
- # (std in the thousands) -- an absolute sigma of 0.2 perturbs them by ~0.002% and
- # does nothing measurable.
- #
- # The grid is dense below 1.0 (where degradation begins) and spreads out above it
- # so the curve is followed all the way into the unusable regime, giving the fit
- # both plateaus (clean accuracy and chance level) plus the transition between.
- # 0.0 is the clean baseline and must stay first; values must be unique.
- noise_levels = [0.0, 0.05, 0.1, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0, 8.0]
- # false => sigma is an absolute value in raw voxel units (not recommended here).
- noise_relative = true
- # Monte-Carlo forward passes used to estimate Bayesian predictive/model
- # uncertainty (step 5/6). Ignored for the deterministic ensemble.
- mc_passes = 30
- # Splits pooled into the combined_*.nc files that analysis prefers. The splits
- # are patient-disjoint, so pooling just enlarges the evaluation set (tighter
- # accuracy/uncertainty estimates). Set to ["test"] for a test-only headline
- # number -- note val is not a pure held-out set if it ever informed tuning.
- combine_splits = ["test", "val"]
- [kfold]
- # Used only by the "scen_kfold" scenario. Each fold trains a full ensemble on
- # ~(k-1)/k of the patients and evaluates on the held-out 1/k; out-of-fold results
- # are pooled to cover every sample. NOTE: cost is ~k * a normal train+eval run.
- k_folds = 5 # number of patient-grouped folds (each ~1/k held out)
- val_fraction = 0.15 # fraction of each fold's non-test patients used for validation
- include_noise = false # also run the noise sweep within each fold (much slower)
|