OSCR

Predicting future brain atrophy based on longitudinal MRI.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 2 matches
  1. [1] § Methods › Implementation and performance evaluation ↔ Models.R, lines 1–50 · score 0.68 · Pearson correlation coefficient, absolute error, metrics, glmnet, brain, models
  2. [2] § Methods › Implementation and performance evaluation ↔ Models.R, lines 1–50 · score 0.54 · correlation coefficients, confidence intervals, error

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

R · 120 lines · 3.9 KB · MIT · 2 matches

  1. # Elastic Net Model for Predicting Brain Atrophy
  2. # Author: Maryam Hadji, University of Eastern Finland, Kuopio, Finland ([email hidden])
  3. # Last updated: 20.Feb.2025
  4. # Requirements:
  5. # R version 4.3.1 or later
  6. # install.packages("glmnet")
  7. # install.packages("caret", dependencies = c("Depends", "Suggests"))
  8. # install.packages("Metrics")
  9. # Usage:
  10. # Set working directory to the directory containing this script
  11. # source('ENLR.R')
  12. # Parameters:
  13. # model_type: An integer (1, 2, 3, or 4) indicating the model configuration to use
  14. # Y: response variable (hippocampal atrophy percentage)
  15. # seed: seed number for reproducible results
  16. # Returned values:
  17. # A list of model performance metrics including:
  18. # - Pearson_R: Pearson correlation coefficients
  19. # - Spearman_R: Spearman correlation coefficients
  20. # - allmae: Mean Absolute Error values
  21. # - CI: Confidence Intervals for predictions
  22. # - coef_all: Coefficients from the model
  23. # Model name
  24. # 1-BL_ MRI only
  25. # 2-BL_ MRI+Riskfactors
  26. # 3-Longitudinal_ MRI only
  27. # 4-Longitudinal_ MRI+Riskfactors
  28. # Load Required Libraries
  29. library(Matrix)
  30. library(ggplot2)
  31. library(lattice)
  32. library(Metrics)
  33. library(caret)
  34. library(randomForest)
  35. library(dplyr)
  36. library(glmnet)
  37. # Load Custom Functions
  38. source("Functions/ENLR.R")
  39. source("Functions/conf_int_2.R")
  40. # Load Data
  41. load("TotalData_bl_24_48.Rdata")
  42. # Function to Calculate Annualized Percentage Change
  43. Annualized_percentage_change <- function(MRI_24, MRI_48, region = "hippocampus") {
  44. if (region == "hippocampus") {
  45. region_24 <- rowMeans(MRI_24[, c("Right Hippocampus", "Left Hippocampus")], na.rm = TRUE)
  46. region_48 <- rowMeans(MRI_48[, c("Right Hippocampus", "Left Hippocampus")], na.rm = TRUE)
  47. } else if (region == "ventricles") {
  48. region_24 <- rowMeans(MRI_24[, c("Right Inf Lat Vent", "Left Inf Lat Vent",
  49. "Right Lateral Ventricle", "Left Lateral Ventricle")], na.rm = TRUE)
  50. region_48 <- rowMeans(MRI_48[, c("Right Inf Lat Vent", "Left Inf Lat Vent",
  51. "Right Lateral Ventricle", "Left Lateral Ventricle")], na.rm = TRUE)
  52. } else if (region == "TGM") {
  53. region_24 <- totalgray_24
  54. region_48 <- totalgray_48
  55. } else {
  56. stop("Invalid region specified. Choose 'hippocampus', 'ventricles', or 'TGM'.")
  57. }
  58. return(((region_24 - region_48) / region_24) * 100 / 2)
  59. }
  60. # Function to Prepare Data and Run Elastic Net Model
  61. run_model <- function(model_type, region = "hippocampus", seed = 123) {
  62. set.seed(seed)
  63. # Calculate Atrophy Rate for Selected Region
  64. Y <- Annualized_percentage_change(MRI_24, MRI_48, region)
  65. if (model_type == 1) {
  66. Xdata <- cbind(MRI_24, Feild_strengt)
  67. } else if (model_type == 2) {
  68. Xdata <- cbind(MRI_24, Age, sex, DX_24, Feild_strengt)
  69. } else if (model_type == 3) {
  70. Xdata <- cbind(MRI_24, MRI_24bl, Feild_strengt)
  71. } else if (model_type == 4) {
  72. Xdata <- cbind(MRI_24, MRI_24bl, Age, sex, APOE4, DX_24, Feild_strengt)
  73. } else {
  74. stop("Invalid model type. Choose 1, 2, 3, or 4.")
  75. }
  76. RID <- rownames(Xdata)
  77. # Normalization
  78. normParam <- preProcess(Xdata, method = c("center", "scale"))
  79. Xdata <- predict(normParam, Xdata)
  80. Pearson_R <- vector()
  81. Spearman_R <- vector()
  82. allmae <- vector()
  83. yhat_pred <- matrix(0, nrow = length(RID), ncol = 10)
  84. coef_all <- list()
  85. for (ll in 1:10) {
  86. res <- ENLR(Xdata, Y, 0.5, ll)
  87. coef_all[[ll]] <- res$coefs
  88. yhat_pred[, ll] <- res$yhat
  89. Pearson_R <- c(Pearson_R, res$pearson_cor)
  90. Spearman_R <- c(Spearman_R, res$spearman_cor)
  91. allmae <- c(allmae, res$MAE)
  92. }
  93. # Confidence Interval calculation
  94. CI <- conf_int(yhat_pred, Y, nboot = 1000, alpha = 0.05)
  95. save(Pearson_R, Spearman_R, allmae, yhat_pred, Y, coef_all, CI, DX_bl, DX,
  96. file = paste0("Results/Model_", model_type, "_", region, "_ENLR.Rdata"))
  97. return(list(Pearson_R = mean(Pearson_R), Spearman_R = mean(Spearman_R),
  98. allmae = mean(allmae), CI = CI, coef_all = coef_all))
  99. }

Models.R at commit b57f8b7, under MIT · at the source

Overview

Authors: Maryam Hadji1, Elaheh Moradi1, Jussi Tohka1
ORCID iDs: Maryam Hadji
  1. A.I. Virtanen Institute for Molecular Sciences, University of Eastern Finland, Kuopio, Finland
Institutions: University of Eastern Finland (Finland)
Journal: Journal of Alzheimer's disease : JAD, volume 113, issue 2, pages 796-812
Dates: received 1 December 2025; accepted 8 June 2026; published online 28 July 2026; in print September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1177/13872877261471049 · PMID 42517811 · PMCID PMC13554364 · OpenAlex W4409383178
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), Alzheimer's / dementia (population), clinical / translational (subfield)
Methods: Machine learning, Statistics, Connectivity, fMRI & imaging, Preprocessing
Keywords: Alzheimer's disease, dementia, hippocampal atrophy, machine learning, mild cognitive impairment, MRI, progression prediction, total gray matter atrophy, ventricle enlargement
MeSH: Alzheimer Disease*, Brain*, Magnetic Resonance Imaging*, Aged, Aged, 80 and over, Atrophy, Disease Progression, Female, Gray Matter, Hippocampus, Humans, Longitudinal Studies, Male, Neuroimaging (* major topic)
Topic: Brain Tumor Detection and Classification (Neurology, Neuroscience), according to OpenAlex
Funding: Research Council of Finland (351849); Flagship of Advanced Mathematics for Sensing Imaging and Modelin (358944); PRIMAL (346934)
Citations: not cited yet (Europe PMC); 65 references in the paper

Abstract

Background: Neuron loss is a hallmark of neurodegenerative diseases and leads to brain atrophy detectable with magnetic resonance imaging (MRI). Accurate prediction of future atrophy is valuable for research in Alzheimer's disease (AD) and related dementias.

Objective: This study aimed to predict annualized percentage changes in hippocampal, ventricular, and total gray matter (TGM) volumes in individuals ranging from cognitively normal to dementia, and to evaluate whether longitudinal MRI-derived change measures improve prediction performance compared with single-time-point MRI information.

Methods: Using elastic net regression, we compared baseline models based on single-timepoint MRI information with longitudinal models incorporating prior MRI-derived change measures. Both approaches were evaluated as MRI-only and MRI + risk-factor variants, with risk factors including age, sex, APOE4, and diagnostic status.

Results: In cross-validated analyses using the Alzheimer's Disease Neuroimaging Initiative (ADNI) cohort, the longitudinal MRI + risk-factor model performed best, yielding Pearson correlations of 0.62 for hippocampal atrophy, 0.51 for ventricular enlargement, and 0.41 for TGM atrophy. Longitudinal models consistently outperformed single time-point models, and adding risk factors improved predictive performance beyond MRI alone. External validation using the Australian Imaging, Biomarkers and Lifestyle cohort confirmed these findings. Predicted atrophy outperformed present-day regional volumes in identifying individuals progressing from normal cognition to MCI/dementia and from MCI to dementia.

Conclusions: MRI-derived longitudinal features enhance atrophy prediction, and predicted atrophy rates provide sensitive markers of future cognitive decline. These findings support the potential utility of predicted atrophy for cohort enrichment and therapeutic trial design.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

MaryamHadji/Future-prediction

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: b57f8b7df185c9ac36a0039758c38f14f350d857, 3 October 2025
Languages: R (12)
Size: 21 files, 12 scripts
Software Heritage: not archived
Found in: the text, “Implementation and performance evaluation”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (6 files), ggplot2 (3 files), caret (2 files), glmnet (2 files), pROC (2 files), randomForest (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
14 files

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 12 scripts, each with its path and the digest of its content;
  • 2 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.

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 2, 28 September 2026

  • Publisher: n/a → IOS Press

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 9 keywords, 14 MeSH terms, 3 funders, 54 references.

Cite

This paper

Hadji, M., Moradi, E., & Tohka, J. (2026). Predicting future brain atrophy based on longitudinal MRI. Journal of Alzheimer's disease : JAD, 113(2), 796-812. https://doi.org/10.1177/13872877261471049

BibTeX

@article{hadji2026predicting,
author = {Hadji, Maryam and Moradi, Elaheh and Tohka, Jussi},
title = {{Predicting future brain atrophy based on longitudinal MRI}},
journal = {Journal of Alzheimer's disease : JAD},
year = {2026},
month = jul,
volume = {113},
number = {2},
pages = {796--812},
publisher = {IOS Press},
issn = {1387-2877},
doi = {10.1177/13872877261471049},
url = {https://doi.org/10.1177/13872877261471049},
pmid = {42517811},
pmcid = {PMC13554364}
}

RIS

TY - JOUR
AU - Hadji, Maryam
AU - Moradi, Elaheh
AU - Tohka, Jussi
TI - Predicting future brain atrophy based on longitudinal MRI
T2 - Journal of Alzheimer's disease : JAD
J2 - J Alzheimers Dis
PY - 2026
DA - 2026/07/28
VL - 113
IS - 2
SP - 796
EP - 812
SN - 1387-2877
PB - IOS Press
DO - 10.1177/13872877261471049
UR - https://doi.org/10.1177/13872877261471049
LA - en
ER -

CSL-JSON

{
"id": "10.1177/13872877261471049",
"type": "article-journal",
"title": "Predicting future brain atrophy based on longitudinal MRI",
"container-title": "Journal of Alzheimer's disease : JAD",
"author": [
{
"family": "Hadji",
"given": "Maryam"
},
{
"family": "Moradi",
"given": "Elaheh"
},
{
"family": "Tohka",
"given": "Jussi"
}
],
"container-title-short": "J Alzheimers Dis",
"volume": "113",
"issue": "2",
"page": "796-812",
"DOI": "10.1177/13872877261471049",
"PMID": "42517811",
"PMCID": "PMC13554364",
"ISSN": "1387-2877",
"publisher": "IOS Press",
"URL": "https://doi.org/10.1177/13872877261471049",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
28
]
]
}
}

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.3390/ijms27156925 [code]
XGBoost-SHAP Interpretable Modeling Identifies and Validates an Eight-Gene Biomarker for Hepatic Encephalopathy Risk Prediction in Cirrhosis.
Journal: International journal of molecular sciences
In common: randomForest, glmnet, pROC, 3 other tools
[2] doi:10.7717/peerj.21426 [code]
Integrated transcriptomic identification and validation reveal key autophagy-associated biomarkers in sleep deprivation.
Journal: PeerJ
In common: randomForest, glmnet, pROC, 3 other tools
[3] doi:10.1080/20002297.2026.2705667 [code]
Oral microbiota dysbiosis related to the cortical thinning and cognitive impairment in cerebral small vessel disease.
Journal: Journal of oral microbiology
In common: glmnet, pROC, caret, 2 other tools, Alzheimer's / dementia, structural MRI / diffusion
[4] doi:10.1186/s40168-026-02342-8 [code]
Impacts of host genetics on gut microbiome composition in Alzheimer's disease.
Journal: Microbiome
In common: randomForest, pROC, caret, 2 other tools, Alzheimer's / dementia
[5] doi:10.21037/jtd-2026-0997 [code]
Machine learning models based on XGBoost algorithm to predict prognosis of lung cancer brain metastases.
Journal: Journal of thoracic disease
In common: randomForest, pROC, caret, 2 other tools, clinical / translational
[6] doi:10.1093/braincomms/fcag146 [code]
Convergent structural brain alterations in chronic pain: a multi-metric individual participant data meta-analysis.
Journal: Brain communications
In common: glmnet, pROC, caret, 2 other tools, structural MRI / diffusion
[7] doi:10.1093/neuonc/noag128 [code]
Spatially-resolved single-cell imaging of melanoma brain metastases identifies localized immune patterns predictive of immune checkpoint blockade response.
Journal: Neuro-oncology
In common: glmnet, pROC, caret, 2 other tools, clinical / translational
[8] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: randomForest, glmnet, caret, 2 other tools
[9] doi:10.1038/s41467-026-77170-3 [code]
DNA methylation profiling identifies long-range epigenetic silencing of clustered protocadherins as a key determinant of meningioma progression.
Journal: Nature communications
In common: randomForest, pROC, caret, 2 other tools
[10] doi:10.1126/sciadv.aec9291 [code]
Computational mechanisms of perception in autism revealed using games inspired by rodent operant tasks.
Journal: Science advances
In common: glmnet, pROC, caret, 2 other tools

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.

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.