Predicting future dementia from routine clinical MRI and linked healthcare data.
The 5 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Methods › Preprocessing ↔ EX2_code/SVM_Code/SPM_Preprocessing.m, lines 28–92 · score 0.75 · deformation fields, SPM, Shooting, template, tissue, MNI
- [2] § Results › MVPA Performance › Analysis 1: All data ↔ EX2_code/SVM_Code/Step6_alt.m, lines 1–93 · score 0.62 · SVM model, p_Thres, outer folds, score, AUC, hyperparameters
- [3] § Methods › Nested cross-validation › Multi-variate pattern analysis ↔ EX2_code/SVM_Code/Step6_alt.m, lines 1–93 · score 0.60 · box constraint, outer fold, kernel, hyperparameters, voxel, SVM
- [4] § Results › MVPA Performance › Analysis 1: All data ↔ EX2_code/SVM_Code/Step4_alt.m, the whole file · a weak match · score 0.60 · SVM model, p_Thres, outer folds, score, AUC, voxels
- [5] § Methods › Nested cross-validation › Multi-variate pattern analysis ↔ EX2_code/SVM_Code/Step4_alt.m, the whole file · a weak match · score 0.58 · box constraint, outer fold, kernel, voxel, SVM, inner
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 139 lines · 6.5 KB · MIT · 2 matches
- #############################################
- # File: Step6_alt.m
- #
- #
- # Purpose:
- # Generate outer loop training results using best hyperparameters [run on n=kFold workers]
- #
- # Author: PS Reel
- tic
- config_experiment
- ttest_driver = readtable(strcat(driverpath,'ttest_driver.csv'));
- for i = 1:kFolds
- worker_id = i;
- addpath(spmpath);
- spm('Defaults', 'PET');
- if not(isfolder(outertraintestpath))
- mkdir(outertraintestpath)
- end
- %prepare result logger
- T = array2table(nan(0,20),'VariableNames',{ 'outer_fold','worker_id','p_Thres', 'n_voxels','C_value', 'K_value','AUC','ACC', 'SENS','SPEC','PPV','NPV','NUM_OBS', 'NUM_CC','NUM_IC','CM11','CM12','CM21','CM22','HP_String'});
- writetable(T,strcat(outertraintestpath,num2str(worker_id),'_outertraintest.csv'),'WriteVariableNames',true );
- L = load(strcat(innertraintestpath,num2str(worker_id),'_bestHP.mat'));
- tmp_data = readtable(strcat(splitpath,'outersplitinfo.csv')); % better split this file to make it faster
- idx_train = use_eval(strcat('tmp_data.','fold_',num2str(worker_id),' == 1'), tmp_data);
- tmp_train_label = table2cell(tmp_data(idx_train,3));
- tmp_train_data = table2cell(tmp_data(idx_train,2));
- idx_test = use_eval(strcat('tmp_data.','fold_',num2str(worker_id),' == 0'), tmp_data);
- tmp_test_label = table2cell(tmp_data(idx_test,3));
- tmp_test_data = table2cell(tmp_data(idx_test,2));
- if not(isfolder(outertraintestpath))
- mkdir(outertraintestpath)
- end
- [max_value,ind]=max(L.bestHP_results.ACC);
- best_p_Thres = L.bestHP_results.p_Thres(ind);
- best_K_value = L.bestHP_results.K_value(ind);
- best_C_value = L.bestHP_results.C_value(ind);
- mask_folder = strcat(string(L.bestHP_results.outer_fold(ind)),'_',string(L.bestHP_results.inner_fold(ind)));
- if isfile(strcat(ttestoutpath,'/',mask_folder,'/',num2str(best_p_Thres,'%0.10f'),'_binarymask.mat'))
- append('Applying best mask to outer fold ',num2str(worker_id))
- mask_module(ttestoutpath,outertraintestpath,worker_id, tmp_train_data, tmp_train_label, mask_folder, best_p_Thres,'train')
- mask_module(ttestoutpath,outertraintestpath,worker_id,tmp_test_data, tmp_test_label, mask_folder, best_p_Thres ,'test')
- TR = load(strcat(outertraintestpath,'/',num2str(worker_id),'/',mask_folder,'/',num2str(best_p_Thres,'%0.10f'),'_traindata.mat')); %train_Vols train_Vol_Labels
- TE = load(strcat(outertraintestpath,'/',num2str(worker_id),'/',mask_folder,'/',num2str(best_p_Thres,'%0.10f'),'_testdata.mat')); %test_Vols test_Vol_Labels
- anSVMModel = fitcsvm(TR.train_Vols, TR.train_Vol_Labels, ...
- 'KernelFunction', 'gaussian', 'KernelScale',best_K_value, 'BoxConstraint', best_C_value);
- [pred_label, score] = predict(anSVMModel, TE.test_Vols); %, testTarg);
- [~,~, ~, AUC] = perfcurve(TE.test_Vol_Labels,abs(score(:,2)),'Above_48.5_years');
- data_table = table(TE.test_Vol_Labels,tmp_test_data,score(:,1));
- writetable(data_table,strcat(outertraintestpath,num2str(worker_id),'_predictions.csv'));
- perf = classperf(TE.test_Vol_Labels,pred_label);
- Num_correctly_classified = perf.DiagnosticTable(1,1) + perf.DiagnosticTable(2,2);
- Num_incorrectly_classified = perf.DiagnosticTable(1,2) + perf.DiagnosticTable(2,1);
- T = table([worker_id,worker_id,best_p_Thres, size(TR.train_Vols,2),best_C_value, best_K_value,AUC, perf.CorrectRate, perf.Sensitivity, perf.Specificity, perf.PositivePredictiveValue,perf.NegativePredictiveValue,perf.NumberOfObservations,Num_correctly_classified,Num_incorrectly_classified,perf.DiagnosticTable(1,1),perf.DiagnosticTable(1,2),perf.DiagnosticTable(2,1),perf.DiagnosticTable(2,2),cellstr(strcat(num2str(best_p_Thres,'%0.10f'),',',num2str(best_C_value),',',num2str(best_K_value)))]);
- writetable(T,strcat(outertraintestpath,num2str(worker_id),'_outertraintest.csv'),WriteMode='append');
- else
- error(append('Best mask folder not found for outer fold ',num2str(worker_id)));
- end
- end_time = toc/3600;
- append('Step6 outer train test processing complete for node ', num2str(worker_id), ' in ', num2str(end_time),' hours' )
- fileID = fopen(append(runtimelogpath,'Step6_',num2str(worker_id),'_','runtime','_',num2str(round(end_time,5)),'_','.txt'),'w');
- fprintf(fileID,append(num2str(round(end_time,5))));
- fclose(fileID);
- end
- exit
- function [out] = use_eval(expression_text, tmp_data) %need tmp_data variable to resolve expression_text
- out = eval(expression_text);
- end
- function mask_module(ttestoutpath,outertraintestpath,worker_id,Imagefilenames, Vol_Labels, mask_folder, p_Thres, dataset_type)
- [x,y,z,~] = size(niftiread(Imagefilenames{1})); % for scalar momentum
- Vols = nan(size(Imagefilenames,1),x,y,z);
- for i = 1:size(Imagefilenames,1)
- Vol_tmp1 = niftiread(Imagefilenames{i});
- Vols(i,:,:,:) =squeeze(Vol_tmp1(:,:,:,1));% 4D for scalar momentum Vol1 =1, Vol2 = 2
- end
- Vols = reshape(Vols,size(Imagefilenames,1),x*y*z);
- [~] = apply_mask(ttestoutpath,outertraintestpath,worker_id,Vols, Vol_Labels,mask_folder, p_Thres, dataset_type,1);
- end
- function [out_Vols] = apply_mask(ttestoutpath,outertraintestpath,worker_id,Vols, Vol_Labels,mask_folder, p_Thres, datasettype, save_masked_volume_flag)
- load(strcat(ttestoutpath,'/',mask_folder,'/',num2str(p_Thres,'%0.10f'),'_binarymask.mat'));
- if not(isfolder(strcat(outertraintestpath,'/', num2str(worker_id),'/', mask_folder)))
- mkdir(strcat(outertraintestpath,'/', num2str(worker_id)));
- mkdir(append(outertraintestpath,'/', num2str(worker_id),'/', mask_folder))
- end
- copyfile(strcat(strcat(ttestoutpath,'/',mask_folder,'/',num2str(p_Thres,'%0.10f'),'_binarymask.mat')), strcat(outertraintestpath,'/',num2str(worker_id),'/',mask_folder,'/',num2str(p_Thres,'%0.10f'),'_binarymask.mat'))
- mask = reshape(mask,1,size(mask,1)*size(mask,2)*size(mask,3));
- [~,ind]=find(mask);
- if strcmp(datasettype,'train')
- train_Vols = Vols(:,ind); % add normalisation here
- if save_masked_volume_flag == 1
- train_Vol_Labels = Vol_Labels;
- out_Vols = train_Vols;
- save(strcat(outertraintestpath,'/',num2str(worker_id),'/',mask_folder,'/',num2str(p_Thres,'%0.10f'),'_traindata.mat'),'train_Vols','train_Vol_Labels')
- end
- elseif strcmp(datasettype,'test')
- test_Vols = Vols(:,ind);
- if save_masked_volume_flag == 1
- test_Vol_Labels = Vol_Labels;
- out_Vols = test_Vols;
- save(strcat(outertraintestpath,'/',num2str(worker_id),'/',mask_folder,'/',num2str(p_Thres,'%0.10f'),'_testdata.mat'),'test_Vols','test_Vol_Labels')
- end
- end
- end
Step6_alt.m at commit bced7fe, under MIT · at the source
Overview
- Division of Population Health and Genomics, University of Dundee,Dundee, UK
- Health Informatics Centre, University of Dundee,Dundee, UK
- Division of Neuroscience, University of Dundee,Dundee, UK
- College of Engineering, University of Wasit,Kut, Iraq
- School of Science and Engineering, Computing, VAMPIRE Project, University of Dundee,Dundee, UK
- Health Data Research UK,London, UK
Abstract
Background: Early identification of individuals at risk of dementia is essential for preventive care and timely enrolment into disease-modifying interventions. However, most existing prediction approaches rely on invasive, costly, or research-only biomarkers that are not scalable within public healthcare systems. Routinely acquired National Health Service (NHS) brain magnetic resonance imaging (MRI) scans, when linked with electronic health records, represent a widely available and privacy-preserving resource for population-level dementia risk stratification. A key challenge for clinical translation is ensuring that machine-learning predictions are reliable, interpretable, and safe to apply, particularly when models are used years before clinical diagnosis.
Methods: We conducted a retrospective case–control study entirely within a secure NHS Trusted Research Environment using routine T1-weighted brain MRI scans linked to electronic health records from Tayside and Fife, Scotland. The study included 518 participants: 259 individuals who subsequently developed dementia and 259 age- and sex-matched controls. Structural brain features were derived from MRI data and analysed using a support-vector-machine classifier with nested cross-validation to minimise overfitting. Prediction confidence was quantified using distance-from-hyperplane
Results: The model predicted future dementia up to five years before first recorded NHS diagnosis with an AUC of 0.71, a performance consistent with real-world clinical imaging rather than research-optimised datasets. Model sensitivity increased for scans acquired closer to diagnosis, indicating stronger predictive signal as disease onset approached. Confidence-based stratification identified a high-confidence subgroup comprising approximately 35% of scans, within which prediction accuracy increased to around 80%. Performance was consistent across heterogeneous routine NHS scanners and imaging protocols, demonstrating robustness and generalisability to real-world clinical data rather than research-optimised acquisitions.
Conclusion: Routinely collected NHS brain MRI data can be used to predict future dementia several years before clinical diagnosis. Incorporating confidence calibration transforms a conventional machine-learning classifier into a safety-aware and clinically interpretable framework by enabling selective use of high-certainty predictions. This approach supports scalable early detection, population-level risk stratification, and targeted recruitment into preventive or disease-modifying clinical trials, with clear potential for integration into public health systems.
Supplementary Information: The online version contains supplementary material available at 10.1186/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.
HicResearch/PICTURES-DementiaClassifier
bced7fe57a795cb877cf9c3f75dc4dcb4aea266f, 16 April 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
15 files
- EX2_code/
Dementia_Cohort_Identifi , R, 168 linescation/ 1A_Dementia_Cohort_CTRE. r - EX2_code/
Dementia_Cohort_Identifi , R, 109 linescation/ 1B_Controls_Cohort_CTRE. r - EX2_code/
SVM_Code/ , MATLAB, 92 lines, 1 matchSPM_Preprocessing.m - EX2_code/
SVM_Code/ , MATLAB, 71 linesStep0.m - EX2_code/
SVM_Code/ , MATLAB, 117 linesStep1.m - EX2_code/
SVM_Code/ , MATLAB, 46 linesStep2_alt.m - EX2_code/
SVM_Code/ , MATLAB, 165 linesStep3_alt.m - EX2_code/
SVM_Code/ , MATLAB, 75 lines, 2 matchesStep4_alt.m - EX2_code/
SVM_Code/ , MATLAB, 54 linesStep4a.m - EX2_code/
SVM_Code/ , MATLAB, 42 linesStep5.m - EX2_code/
SVM_Code/ , MATLAB, 139 lines, 2 matchesStep6_alt.m - EX2_code/
SVM_Code/ , MATLAB, 55 linesStep7_alt.m - EX2_code/
SVM_Code/ , MATLAB, 60 linesconfig_experiment.m - EX2_code/
SVM_Code/ , MATLAB, 62 linessetup_IXI_data.m - README.md, Text, 378 lines
Zenodo 13921331
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
Zenodo 7089491
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 14 scripts, each with its path and the digest of its content;
- 5 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
The data related to the results presented in this article can be accessed within the HIC TRE subject to ethical and governance approvals. The details of dementia cohort identification can be accessed online on the HDR UK Phenotype library (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 5 keywords, 14 MeSH terms, 1 funder, 37 references.
Cite
This paper
Reel, P. S., Al-Wasity, S., Edwards, C., Reel, S., Mansouri-Benssassi, E., Suveges, S., Mookiah, M. R. K., Krueger, S., Trucco, E., Jefferson, E., Doney, A., & Steele, J. D. (2026). Predicting future dementia from routine clinical MRI and linked healthcare data. Alzheimer's research & therapy, 18(1), 164. https://
BibTeX
@article{reel2026predict
author = {Reel, Parminder Singh and Al-Wasity, Salim and Edwards, Craig and Reel, Smarti and Mansouri-Benssassi, Esma and Suveges, Szabolcs and Mookiah, Muthu Rama Krishnan and Krueger, Susan and Trucco, Emanuele and Jefferson, Emily and Doney, Alexander and Steele, J. Douglas},
title = {{Predicting future dementia from routine clinical MRI and linked healthcare data}},
journal = {Alzheimer's research \& therapy},
year = {2026},
month = may,
volume = {18},
number = {1},
pages = {164},
publisher = {BMC},
issn = {1758-9193},
doi = {10.1186/
url = {https://
pmid = {42169066},
pmcid = {PMC13366786}
}
RIS
TY - JOUR
AU - Reel, Parminder Singh
AU - Al-Wasity, Salim
AU - Edwards, Craig
AU - Reel, Smarti
AU - Mansouri-Benssassi, Esma
AU - Suveges, Szabolcs
AU - Mookiah, Muthu Rama Krishnan
AU - Krueger, Susan
AU - Trucco, Emanuele
AU - Jefferson, Emily
AU - Doney, Alexander
AU - Steele, J. Douglas
TI - Predicting future dementia from routine clinical MRI and linked healthcare data
T2 - Alzheimer's research & therapy
J2 - Alzheimers Res Ther
PY - 2026
DA - 2026/
VL - 18
IS - 1
SP - 164
SN - 1758-9193
PB - BMC
DO - 10.1186/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1186/
"type": "article-journal",
"title": "Predicting future dementia from routine clinical MRI and linked healthcare data",
"container-title": "Alzheimer's research & therapy",
"author": [
{
"family": "Reel",
"given": "Parminder Singh"
},
{
"family": "Al-Wasity",
"given": "Salim"
},
{
"family": "Edwards",
"given": "Craig"
},
{
"family": "Reel",
"given": "Smarti"
},
{
"family": "Mansouri-Benssassi",
"given": "Esma"
},
{
"family": "Suveges",
"given": "Szabolcs"
},
{
"family": "Mookiah",
"given": "Muthu Rama Krishnan"
},
{
"family": "Krueger",
"given": "Susan"
},
{
"family": "Trucco",
"given": "Emanuele"
},
{
"family": "Jefferson",
"given": "Emily"
},
{
"family": "Doney",
"given": "Alexander"
},
{
"family": "Steele",
"given": "J. Douglas"
}
],
"container-title-short":
"volume": "18",
"issue": "1",
"page": "164",
"DOI": "10.1186/
"PMID": "42169066",
"PMCID": "PMC13366786",
"ISSN": "1758-9193",
"publisher": "BMC",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
21
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.nicl.2026.104012 [code]
- Structural-functional multilayer brain network properties and outcome of combined repetitive transcranial magnetic stimulation and psychotherapy for obsessive-compulsive disorder.Journal: NeuroImage. ClinicalIn common: SPM, Image Processing Toolbox, Statistics and Machine Learning Toolbox, 1 other tool, other, structural MRI / diffusion
- [2] doi:10.1038/s41593-026-02359-0 [code]
- The cross-site reproducibility of MRI morphometric phenotypes in psychiatric disorders.Journal: Nature neuroscienceIn common: SPM, Image Processing Toolbox, Statistics and Machine Learning Toolbox, structural MRI / diffusion, 1 reference
- [3] doi:10.1038/s41386-026-02426-x [code]
- A frontotemporal dementia-like phenotype in schizophrenia: links to striatal dopamine and iron accumulation.Journal: Neuropsychopharmacology : official publication of the American College of NeuropsychopharmacologyIn common: SPM, Image Processing Toolbox, Statistics and Machine Learning Toolbox, Alzheimer's / dementia, structural MRI / diffusion, clinical / translational
- [4] doi:10.1093/braincomms/fcag269 [code]
- Distinct brain regions are affected by neurodevelopmental or pre-dementia changes in Down syndrome.Journal: Brain communicationsIn common: SPM, Alzheimer's / dementia, structural MRI / diffusion, 2 references
- [5] doi:10.1038/s41746-026-02732-0 [code]
- A dynamic risk prediction framework for Alzheimer's disease and related dementias with interpretability.Journal: NPJ digital medicineIn common: Alzheimer's / dementia, clinical / translational, 3 references
- [6] doi:10.1038/s42003-026-10276-y [code]
- The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset.Journal: Communications biologyIn common: SPM, Image Processing Toolbox, Statistics and Machine Learning Toolbox, 1 other tool, structural MRI / diffusion
- [7] doi:10.1162/imag.a.1174 [code]
- Retinal nerve fibre layer thickness reflects characteristics of brain grey and white matter.Journal: Imaging neuroscience (Cambridge, Mass.)In common: SPM, tidyverse, other, structural MRI / diffusion, clinical / translational, 1 reference
- [8] doi:10.1002/hbm.70602 [code]
- Neuroimaging Correlates of Post-Stroke Pain After Ischemic Stroke: Secondary Analysis of the INSPiRE-TMS Trial.Journal: Human brain mappingIn common: SPM, Image Processing Toolbox, Statistics and Machine Learning Toolbox, other, clinical / translational
- [9] doi:10.1016/j.nicl.2026.103994 [code]
- Mapping the multiscale neuroanatomy of GRN-related frontotemporal dementia using mode-based morphometry.Journal: NeuroImage. ClinicalIn common: SPM, Image Processing Toolbox, Statistics and Machine Learning Toolbox, Alzheimer's / dementia, structural MRI / diffusion
- [10] doi:10.1016/j.xcrm.2026.102943 [code]
- Parent-of-origin effects in Alzheimer's liability dissociate neurocognitive and cardiovascular traits in at-risk individuals.Journal: Cell reports. MedicineIn common: SPM, Image Processing Toolbox, Statistics and Machine Learning Toolbox, Alzheimer's / dementia, clinical / translational
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 3 repositories of the authors' code, each at its verified commit and with its license, 14 scripts, and 5 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:233ba18f92c0f0ae…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
