help > RE: Predictive Models In Neuroimaging Sept 24 2025
Mar 27, 2026  08:03 AM | Alfonso Nieto-Castanon - Boston University
RE: Predictive Models In Neuroimaging Sept 24 2025

Hi Aliaa,


We are still working on GUI integration and adding the documentation to the conn-toolbox site but all of the functionality is already there in the latest version of CONN (25b) and we are encouraging everyone to try it out and let us know any thoughts/comments/suggestions! It is implemented as a conn module (conn_module('CPM',...)) so that it can be used with any source of data (CONN-generated or not). See below for a quick description of how to try it out.


Best


Alfonso


------------


 PredictiveModel (CPM): runs CONN second-level connectome predictive model on user-defined data
 basic syntax:
conn_module PredictiveModel create <modelname> : creates a model named <modelname> from training data
conn_module PredictiveModel display <modelname> : displays top predictor variables in model <modelname>
conn_module PredictiveModel display.scatter <modelname> : displays scatterplot of model <modelname> cross-validated predictions
conn_module PredictiveModel predict <modelname> : uses model <modelname> to predict new data (outside of training data)

basic syntax:
conn_module('PredictiveModel', option, modelname)
option : 'create' to create a new model from training data
'display' to display the top predictor variables in a model
'display.scatter' to display scatterplot of the model cross-validated predictions
'display.forward' to display the results of a forward.model GLM analysis using the outcome measures as predictors
'predict' to apply this model to new data (outside of training data)
'parallel.status' to display the status of analyses run remotely or in background
modelname : name of model file
when creating a model, the model parameters and fit information is stored in a file named <modelname>.mat in the current directory

advanced syntax:
conn_module('PredictiveModel', 'create', modelname, 'fieldname1', fieldvalue1, 'fieldname2', fieldvalue2, ...)
Optional fieldnames (enter in any order)
predictor : [Nsamples x Npredictors] matrix of predictor values
alternatively .nii, .mtx.nii, or .surf.nii file containing predictors data (with one image per sample/subject) (see conn_vol_write, conn_surf_write and conn_mtx_write to create volume/surface/matrix nifti files)
(note: when predictor variables are entered as a file a file with the same format named <modelname>(.nii|.mtx.nii|.surf.nii) will be created containing the model regressor parameters)
outcome : [Nsamples x 1] vector of outcome values
alternatively .mat or .csv file containing outcome values (with one row per sample/subject)
covariate : [Nsamples x Ncovariates] matrix of covariate values (additional fixed set of covariates to be included in all models)
alternatively .mat or .csv file containing covariate values (with one row per sample/subject)
fit : 0/1 indicates whether to compute fit values in training dataset using nested crossvalidation
null : 0/1 indicates whether to compute null-hypothesis distribution of MSE scores using permutation analyses
parallel : 0/1 indicates whether to run analyses remotely or in background using default HPC settings in CONN
nnull : number of simulations to run when computing null-hypothesis distribution
folder : folder where output <modelname>.mat file will be stored

advanced syntax:
outcome = conn_module('PredictiveModel', 'predict', modelname, 'fieldname1', fieldvalue1, 'fieldname2', fieldvalue2, ...)
Optional fieldnames (enter in any order)
predictor : [Nnewsamples x Npredictors] matrix of predictor values from new samples/subjects
alternatively .nii, .mtx.nii, or .surf.nii file containing predictors data from new samples/subjects (with one image per sample/subject) (see conn_vol_write, conn_surf_write and conn_mtx_write to create volume/surface/matrix nifti files)
covariate : [Nnewsamples x Ncovariates] matrix of covariate values from new samples/subjects
alternatively .mat or .csv file containing covariate values from new samples/subjects (with one row per sample/subject)
outcome : [Nnewsamples x 1] output vector containing predicted outcome values for these new samples/subjects


Originally posted by aliaa:



Hi Alfonso,


 


I saw this announcement when I was looking if it is possible to do predictive modeling in CONN. Have these updates been implemented yet in the latest version of CONN? It would be great if we could already start using these features.


 


Best wishes,
Aliaa



 

Threaded View

TitleAuthorDate
Alfonso Nieto-Castanon Sep 1, 2025
aliaa Mar 23, 2026
RE: Predictive Models In Neuroimaging Sept 24 2025
Alfonso Nieto-Castanon Mar 27, 2026