OSCR

Using connectome-based predictive models to reveal the systems standardized tests and clinical symptoms are reflecting.

Code ↔ Paper

6 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.

3 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 6 matches
  1. [1] § Methods › Cognitive constructs & a priori network definitions ↔ Testing_Set227_KRR.m, lines 60 to 120 · score 0.86 · Shen268 atlas, declarative memory, network definition, working memory, construct nodes, cognitive control · block oscr:b:R46WKKD43EGAD-0 · Report a mismatch
  2. [2] § Results ↔ Testing_Set227_KRR.m, lines 60 to 120 · score 0.84 · NeuroSynth, Shen268 atlas, declarative memory, working memory, connectivity matrices, cognitive control · block oscr:b:R46WKKD43EGAD-0 · Report a mismatch
  3. [3] § Methods › Cognitive constructs & a priori network definitions ↔ Testing_Set227_KRR_combined_scores.m, lines 42 to 109 · score 0.76 · Shen268 atlas, declarative memory, network definition, construct nodes, hippocampus, ROI · block oscr:b:9T2D1F4JP08AF-J · Report a mismatch
  4. [4] § Results ↔ Testing_Set227_KRR.m, lines 1 to 58 · score 0.61 · kernel ridge regression, predicted behavioral, connectivity matrices, behavioral scores, edges, modeling · block oscr:b:8CY0P2A51VQXN-Q · Report a mismatch
  5. [5] § Methods › Model ↔ Testing_Set227_KRR.m, lines 1 to 58 · score 0.59 · kernel ridge regression, prediction errors, connectivity matrices, covariate, edges, models · block oscr:b:8CY0P2A51VQXN-Q · Report a mismatch
  6. [6] § Results › Testing the tests can be performed with any network of interest ↔ Testing_Set227_KRR_combined_scores.m, lines 42 to 109 · score 0.55 · Yeo networks, network definitions, language network, DMN, atlas, brain · block oscr:b:9T2D1F4JP08AF-J · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 493 lines · 23 KB · no license · 4 matches

  1. % This is an example to show how to run the kernel ridge regression model
  2. % to predict behavioral scores based on the connectivity matrices.
  3. % We provided a subset of data that was collected and processed at Yale MRRC.
  4. % The provided dataset includes connectivity matrices, behavioral scores, and
  5. % covariates from all subjects.
  6. clear
  7. clc
  8. % % define your data path
  9. % data_path = '';
  10. % % define your path to save the results
  11. % save_path = '';
  12. % % define your path to save the prediction errors
  13. % error_path = '';
  14. % load the matrix after the regression
  15. % Each edge in the matrix is the residue after regressing out the covariates
  16. load([data_path, 'trans_data_set227_mat_cov_regressed'], 'res_mat');
  17. % load the original scores
  18. load([data_path, 'trans_data_all_scores_set227'],'all_score');
  19. % 146 = 124 + 16 + 6; other sub-scores + cognitive_scores + clinical scores
  20. % the first 124 columns are sub-scores
  21. % column 125-140 are the 16 cognitive scores
  22. % column 141-146 are the 6 clinical scores
  23. % load the regressed scores (for evaluation purpose)
  24. % the covariates are regressed from the behavioral scores
  25. load([data_path, 'trans_data_set227_allscores_cov_regressed'], 'all_res');
  26. % load the covariates
  27. load([data_path, 'trans_data_combined_update_cov_diag_set227'], 'cov_combined');
  28. % choose the set of behavioral scores to predict
  29. nan_flg = 1;
  30. if( nan_flg ==1)
  31. % cognitive scores (16)
  32. datamat_orig = all_score(:, 125:140);
  33. datamat_res = all_res(:, 125:140);
  34. elseif( nan_flg==2)
  35. % all rest of the sub scores (124)
  36. datamat_orig = all_score(:, 1:124);
  37. datamat_res = all_res(:, 1:124);
  38. elseif( nan_flg ==3)
  39. % clinical scores (6)
  40. datamat_orig = all_score(:, 141:146);
  41. datamat_res = all_res(:, 141: 146);
  42. elseif( nan_flg ==4)
  43. % load the newly computed brief composite score
  44. % we selected a subset of the brief subscore and create a new composite score
  45. load([data_path, 'trans_data_set227_brief_new_composite'], 'new_brief_orig', 'new_brief_res', 'new_name');
  46. datamat_orig = new_brief_orig;
  47. datamat_res = new_brief_res;
  48. end
  49. % find the number of behavioral scores to predict
  50. no_beh = size( datamat_res, 2);
  51. % matrices after regression
  52. multi_run_all_mats = res_mat;
  53. % the connectivity matrices are organized as a 4D matrix of no_of_nodes * no_of_nodes * no_runs * no_subjects
  54. no_runs = size(multi_run_all_mats, 3); % each subject has 8 runs
  55. no_sub = size(multi_run_all_mats, 4);
  56. no_nodes = size(multi_run_all_mats,1);
  57. % the atlas we used for creating the connectivity matrices has 268 nodes.
  58. % find the indices of the edges in the upper triangle of a matrix
  59. % the connectivity matrix is symmetric
  60. aa = ones( no_nodes, no_nodes);
  61. aa_upp = triu(aa,1);
  62. upp_id = find( aa_upp>0);
  63. upp_len = length(upp_id);
  64. % To select edges from pre-defined networks/constructs
  65. % The prediction is based on an individual network/construct
  66. % yeo_flg = 1; % the yeo network (7 networks)
  67. % yeo_flg = 3; % use DMN and Ev language
  68. % yeo_flg = 2; % use the whole brain
  69. yeo_flg = 0; % use the constructs (6 constructs defined based on NeuroSynth: attention, perception, declarative memory, language, cognitive control and working memory)
  70. % yeo_flg = 4; % combine all 6 constructs;
  71. if( yeo_flg==0)
  72. % load the construct nodes
  73. load([data_path, 'construct6_network268_node_list'], 'check_roi');
  74. % 'check_roi' was created based on NeuroSynth results
  75. % it is a labeling matrix where each column represents one construct
  76. % and each row represents one ROI
  77. % the order of the columns: attention, perception, declarative memory, language, cognitive control, working memory
  78. % replce the declarative memory construct with nodes from the
  79. % hippocampus from the Shen268 atlas
  80. manual_dec = 1;
  81. % including bilateral hippocampus nodes
  82. if(manual_dec==1)
  83. hip_id = [93:97 230:234];
  84. check_roi(:, 3) = 0;
  85. check_roi(hip_id, 3) = 1;
  86. end
  87. no_net = 6;
  88. elseif( yeo_flg ==1)
  89. % load the Yeo's 7 network definition
  90. yeomap = dlmread([data_path, 'Parc268toYeo7netlabel']);
  91. no_net = size( yeomap, 2);
  92. check_roi = yeomap;
  93. elseif( yeo_flg ==2)
  94. % use the whole brain;
  95. elseif( yeo_flg ==3)
  96. % use the dmn and Ev's language network
  97. file_name = 'Shen268_10network';
  98. % use the dmn network definition from the in-house developed resting state functional brain network
  99. n_label = dlmread([data_path, file_name], '\t', 0, 0);
  100. dmn_nodes = find( n_label(:,2)==3);
  101. check_roi = zeros(no_nodes, 2);
  102. check_roi( n_label(dmn_nodes,1), 1) = 1;
  103. % use the language network:
  104. % Lipkin, Ben (2022). LanA Dataset. figshare. Dataset. https://doi.org/10.6084/m9.figshare.20425209.v1
  105. load([data_path,'Ev_lan_nodes_12'], 'lan_node');
  106. check_roi( lan_node, 2) =1;
  107. no_net = 2;
  108. elseif( yeo_flg==4)
  109. % load the construct nodes and combine all of them
  110. load([data_path, 'construct6_network268_node_list'], 'check_roi');
  111. manual_dec = 1; %
  112. if(manual_dec==1)
  113. hip_id = [93:97 230:234];
  114. check_roi(:, 3) = 0;
  115. check_roi(hip_id, 3) = 1;
  116. end
  117. sum_check = sum( check_roi,2);
  118. check_roi = (sum_check>0);
  119. no_net = 1;
  120. end
  121. % filling the lower triangle of the conn matrix
  122. for run_idx = 1: no_runs
  123. for sub_id = 1: no_sub
  124. cur = squeeze(multi_run_all_mats(:,:,run_idx, sub_id));
  125. cur = cur+transpose(cur);
  126. multi_run_all_mats(:,:, run_idx, sub_id) = cur;
  127. end
  128. end
  129. % lambda is the hyper-parameter of the kernle ridge regression
  130. lambda = [ 0 0.00001 0.0001 0.001 0.004 0.007 0.01 0.04 0.07 0.1 0.4 0.7 1 1.5 2 2.5 3 3.5 4 5 10 15 20];
  131. lambda_no = length(lambda);
  132. no_iter = 1; % number of iteration for the k-fold cross validation
  133. scale_flg =0; % scale of the kernel
  134. fold = 10; % k-fold
  135. bin_size = round( no_sub/fold); % size of each fold
  136. error_flg = 0; % whether or not to save the prediction error
  137. for ll = 1: lambda_no % loop through all lambda values
  138. disp(['lambda = ', num2str(lambda(ll))]);
  139. cur_lambda = lambda(ll);
  140. % create placeholders for prediction performance
  141. if( yeo_flg <2)
  142. all_perf_r = zeros(no_iter, no_beh, no_net);
  143. all_perf_p = zeros(no_iter, no_beh, no_net);
  144. elseif( yeo_flg==2)
  145. all_perf_r = zeros(no_iter, no_beh);
  146. all_perf_p = zeros(no_iter, no_beh);
  147. elseif( yeo_flg==3)
  148. all_perf_r = zeros(no_iter, no_beh, no_net);
  149. all_perf_p = zeros(no_iter, no_beh, no_net);
  150. end
  151. % start the prediction
  152. for iter = 1: no_iter
  153. cur_order= randperm(no_sub); % shuffle the subject order
  154. cur_cov = cov_combined(cur_order, :); % shuffle the covariates accordingly
  155. % predict a single behavioral score
  156. for behav_idx = 1: no_beh;
  157. % select the behavioral score to predict
  158. all_behav_res = datamat_res(:, behav_idx);
  159. all_behav_orig = datamat_orig(:, behav_idx);
  160. % first shuffle the behavioral score
  161. all_behav_res = all_behav_res(cur_order);
  162. all_behav_orig = all_behav_orig(cur_order);
  163. % then remove subjects with NaN scores
  164. inner_va_id = find( isnan(all_behav_orig)==0);
  165. cur_no_sub = length(inner_va_id);
  166. % all with valid scores
  167. cur_behav_orig = all_behav_orig(inner_va_id);
  168. cur_behav_res = all_behav_res(inner_va_id);
  169. cur_cov_va = cur_cov(inner_va_id, :); % the 5 covariates
  170. va_order = cur_order(inner_va_id);
  171. % placeholders to save the predicted values
  172. if( yeo_flg <2 || yeo_flg>2)
  173. behav_pred = zeros(cur_no_sub,no_net);
  174. else
  175. behav_pred = zeros(cur_no_sub, 1);
  176. end
  177. % using all runs
  178. all_mats = multi_run_all_mats(:,:,:, cur_order);
  179. cur_mat = all_mats(:,:, :, inner_va_id);
  180. % start the cross validation loop
  181. for leftout = 1:fold;
  182. left_sub = (leftout-1)*bin_size+1: min(cur_no_sub, leftout*bin_size);
  183. % leave out subjects from matrices and behavior
  184. train_mats = cur_mat;
  185. train_mats(:,:,:, left_sub) = [];
  186. % number of training subjects
  187. c_sub_no = size(train_mats, 4);
  188. % subject id included in the training set
  189. cur_train_sub = va_order;
  190. cur_train_sub(left_sub) = [];
  191. % regress the covariates within the training set
  192. train_cov = cur_cov_va;
  193. train_cov(left_sub, :) = [];
  194. train_behav_orig = cur_behav_orig;
  195. train_behav_orig(left_sub) = [];
  196. [b, bint, train_behav_res] = regress( train_behav_orig, [train_cov, ones(c_sub_no, 1)]);
  197. % normalize the score after regression
  198. train_mu = mean(train_behav_res);
  199. train_std = std(train_behav_res);
  200. train_norm = (train_behav_res-train_mu)/train_std;
  201. % matrices of the test subjects
  202. test_mat = cur_mat(:,:,:, left_sub);
  203. left_no = length( left_sub);
  204. if( yeo_flg <2 || yeo_flg>2)
  205. for con = 1: no_net;
  206. % find the nodes for the selected network/construct
  207. if( yeo_flg ==0)
  208. cur_con_nodes = find( check_roi(:, con)>0);
  209. elseif( yeo_flg ==1)
  210. cur_con_nodes = find( check_roi(:, con)==1);
  211. elseif( yeo_flg== 3)
  212. cur_con_nodes = find( check_roi(:, con)==1);
  213. elseif( yeo_flg==4)
  214. cur_con_nodes = find( check_roi(:, con)==1);
  215. end
  216. cur_no = length( cur_con_nodes);
  217. % find the edges between the selected nodes and the rest of the brain
  218. all_nodes = ones(1, no_nodes);
  219. all_nodes(cur_con_nodes) = 0;
  220. all_d_nodes = find( all_nodes==1);
  221. aa = ones(no_nodes, no_nodes);
  222. aa_upp = triu(aa, 1);
  223. aa_upp(all_d_nodes, all_d_nodes) = 0;
  224. upp_id = find( aa_upp);
  225. cur_con_mat = [];
  226. cur_con_test = [];
  227. % running the prediction from each individual runs
  228. for run_idx = 1:no_runs
  229. cur_train_mat = reshape(squeeze(train_mats(:,:,run_idx,:)), no_nodes*no_nodes, c_sub_no);
  230. cur_con_mat = [cur_con_mat; cur_train_mat(upp_id,:)];
  231. cur_test_mat = reshape( squeeze(test_mat(:,:,run_idx,:)), no_nodes*no_nodes, left_no);
  232. cur_con_test = [cur_con_test; cur_test_mat(upp_id,:)];
  233. end
  234. % scale of the Gaussian kernel
  235. if( scale_flg==0)
  236. scale = 0.2;
  237. else
  238. scale = 1;
  239. end
  240. % running the kernel ridge regression
  241. [pred, estimate] = kernel_prediction(cur_con_mat, cur_con_test, train_norm, cur_lambda, 'Gaussian', scale);
  242. behav_pred(left_sub, con) = pred;
  243. end
  244. elseif( yeo_flg ==2)
  245. cur_con_mat =[];
  246. cur_con_test = [];
  247. % concatenate the edges from all 8 runs
  248. for run_idx = 1:no_runs
  249. cur_train_mat = reshape(squeeze(train_mats(:,:,run_idx,:)), no_nodes*no_nodes, c_sub_no);
  250. cur_con_mat = [cur_con_mat; cur_train_mat(upp_id,:)];
  251. cur_test_mat = reshape( squeeze(test_mat(:,:,run_idx,:)), no_nodes*no_nodes, left_no);
  252. cur_con_test = [cur_con_test; cur_test_mat(upp_id,:)];
  253. end
  254. if( scale_flg==0)
  255. scale = 0.2;
  256. else
  257. scale = 1;
  258. end
  259. [pred, estimate] = kernel_prediction(cur_con_mat, cur_con_test, train_norm, cur_lambda, 'Gaussian', scale);
  260. behav_pred(left_sub) = pred;
  261. end
  262. end
  263. if(yeo_flg<2 || yeo_flg>2)
  264. pred_oo = zeros(no_sub, no_net); % prediction before the shuffle
  265. error_oo = zeros(no_sub, no_net); % error before the shuffle
  266. for con= 1:no_net;
  267. % compute the correlation between the predicted scores and the observed scores (after regression)
  268. [R, P] = corr( squeeze(behav_pred(:, con)), cur_behav_res);
  269. all_perf_r(iter, behav_idx, con) = R;
  270. all_perf_p(iter , behav_idx, con) = P;
  271. % compute the prediction error
  272. pred_ss = zeros(1, no_sub); % prediction after the shuffle
  273. pred_ss(inner_va_id) = behav_pred(:,con);
  274. % prediction error in the original order of subjects
  275. pred_oo(cur_order, con) = pred_ss;
  276. error_ss = zeros(1, no_sub);
  277. cc_mean = mean(cur_behav_res);
  278. cur_behav_mean = cur_behav_res-cc_mean;
  279. cc_norm = norm(cur_behav_mean); % normalized the scores (after regression)
  280. error_ss(inner_va_id) = (behav_pred(:, con) - cur_behav_mean/cc_norm); % signed error
  281. error_oo(cur_order, con) = error_ss;
  282. clear cc_norm cc_mean;
  283. end
  284. else
  285. pred_oo = zeros(no_sub, 1);
  286. error_oo = zeros(no_sub, 1);
  287. % compute the correlation between the predicted scores and the observed scores (after regression)
  288. [R, P] = corr( behav_pred, cur_behav_res);
  289. all_perf_r(iter, behav_idx) = R;
  290. all_perf_p(iter, behav_idx) = P;
  291. % compute the prediction error
  292. pred_ss = zeros( no_sub, 1); % prediction after the shuffle
  293. pred_ss(inner_va_id) = behav_pred;
  294. % in the original order
  295. pred_oo(cur_order) = pred_ss;
  296. error_ss = zeros(no_sub, 1);
  297. cc_mean = mean(cur_behav_res);
  298. cur_behav_mean = cur_behav_res-cc_mean;
  299. cc_norm = norm(cur_behav_mean);
  300. error_ss(inner_va_id) = (behav_pred - cur_behav_mean/cc_norm); % signed error
  301. error_oo(cur_order) = error_ss;
  302. clear cc_norm cc_mean;
  303. end
  304. % save the prediction errors
  305. if( error_flg ==1)
  306. error_path = '/data22/mri_group/xilin_data/alex/trans_data/set227/errors/';
  307. if( yeo_flg==0)
  308. if( nan_flg ==1)
  309. save([error_path,'trans_data_set227_KRR_error_singlecon_cogbehav', num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  310. elseif( nan_flg ==2)
  311. save([error_path,'trans_data_set227_KRR_error_singlecon_subscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  312. elseif( nan_flg==3)
  313. save([error_path,'trans_data_set227_KRR_error_singlecon_clicscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  314. end
  315. elseif( yeo_flg ==1)
  316. if( nan_flg ==1)
  317. save([error_path,'trans_data_set227_KRR_error_yeonet_cogbehav', num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  318. elseif( nan_flg ==2)
  319. save([error_path,'trans_data_set227_KRR_error_yeonet_subscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  320. elseif( nan_flg==3)
  321. save([error_path,'trans_data_set227_KRR_error_yeonet_clicscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  322. end
  323. elseif( yeo_flg==2)
  324. if( nan_flg ==1)
  325. save([error_path,'trans_data_set227_KRR_error_wholebrain_cogbehav', num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  326. elseif( nan_flg ==2)
  327. save([error_path,'trans_data_set227_KRR_error_wholebrain_subscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  328. elseif( nan_flg==3)
  329. save([error_path,'trans_data_set227_KRR_error_wholebrain_clicscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  330. end
  331. elseif( yeo_flg==3)
  332. if( nan_flg ==1)
  333. save([error_path,'trans_data_set227_KRR_error_dmnEv_cogbehav', num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  334. elseif( nan_flg ==2)
  335. save([error_path,'trans_data_set227_KRR_error_dmnEv_subscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  336. elseif( nan_flg==3)
  337. save([error_path,'trans_data_set227_KRR_error_dmnEv_clicscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  338. end
  339. elseif( yeo_flg ==4)
  340. if( nan_flg ==1)
  341. save([error_path,'trans_data_set227_KRR_error_all6con_cogbehav', num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  342. elseif( nan_flg ==2)
  343. save([error_path,'trans_data_set227_KRR_error_all6con_subscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  344. elseif( nan_flg==3)
  345. save([error_path,'trans_data_set227_KRR_error_all6con_clicscores',num2str(behav_idx), '_iter', num2str(iter)], 'error_oo', 'pred_oo', 'cur_order');
  346. end
  347. end
  348. end
  349. end
  350. end
  351. % save the prediction performance
  352. if( yeo_flg ==0)
  353. if( scale_flg ==0)
  354. if( nan_flg==1)
  355. save([save_path, 'trans_data_singlecon_KRR_10fold_normalized_allruns_set227_cogbehav_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  356. elseif( nan_flg==2)
  357. save([save_path, 'trans_data_singlecon_KRR_10fold_normalized_allruns_set227_subscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  358. elseif( nan_flg==3)
  359. save([save_path, 'trans_data_singlecon_KRR_10fold_normalized_allruns_set227_cliscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  360. elseif( nan_flg==4)
  361. save([save_path, 'trans_data_singlecon_KRR_10fold_normalized_allruns_set227_briefcomp_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  362. end
  363. end
  364. elseif( yeo_flg==1)
  365. if( scale_flg ==0)
  366. if( nan_flg==1)
  367. save([save_path, 'trans_data_yeonet_KRR_10fold_normalized_allruns_set227_cogbehav_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  368. elseif( nan_flg==2)
  369. save([save_path, 'trans_data_yeonet_KRR_10fold_normalized_allruns_set227_subscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  370. elseif( nan_flg==3)
  371. save([save_path, 'trans_data_yeonet_KRR_10fold_normalized_allruns_set227_clicscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  372. elseif( nan_flg==4)
  373. save([save_path, 'trans_data_yeonet_KRR_10fold_normalized_allruns_set227_briefcomp_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  374. end
  375. end
  376. elseif( yeo_flg==2)
  377. if( scale_flg ==0)
  378. if( nan_flg==1)
  379. save([save_path, 'trans_data_wholebrain_KRR_10fold_normalized_allruns_set227_cogbehav_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  380. elseif( nan_flg ==2)
  381. save([save_path, 'trans_data_wholebrain_KRR_10fold_normalized_allruns_set227_subscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  382. elseif( nan_flg==3)
  383. save([save_path, 'trans_data_wholebrain_KRR_10fold_normalized_allruns_set227_clicscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  384. elseif( nan_flg==4)
  385. save([save_path, 'trans_data_wholebrain_KRR_10fold_normalized_allruns_set227_briefcomp_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  386. end
  387. end
  388. elseif( yeo_flg==3)
  389. if( scale_flg ==0)
  390. if( nan_flg==1)
  391. save([save_path, 'trans_data_dmnEv_KRR_10fold_normalized_allruns_set227_cogbehav_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  392. elseif( nan_flg ==2)
  393. save([save_path, 'trans_data_dmnEv_KRR_10fold_normalized_allruns_set227_subscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  394. elseif( nan_flg==3)
  395. save([save_path, 'trans_data_dmnEv_KRR_10fold_normalized_allruns_set227_clicscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  396. elseif( nan_flg==4)
  397. save([save_path, 'trans_data_dmnEv_KRR_10fold_normalized_allruns_set227_briefcomp_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  398. end
  399. end
  400. elseif( yeo_flg==4)
  401. if( scale_flg ==0)
  402. if( nan_flg==1)
  403. save([save_path, 'trans_data_all6con_KRR_10fold_normalized_allruns_set227_cogbehav_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  404. elseif( nan_flg ==2)
  405. save([save_path, 'trans_data_all6con_KRR_10fold_normalized_allruns_set227_subscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  406. elseif( nan_flg==3)
  407. save([save_path, 'trans_data_all6con_KRR_10fold_normalized_allruns_set227_clicscores_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  408. elseif( nan_flg==4)
  409. save([save_path, 'trans_data_all6con_KRR_10fold_normalized_allruns_set227_briefcomp_lambda', num2str(ll)], 'all_perf_r', 'cur_lambda');
  410. end
  411. end
  412. end
  413. end

Testing_Set227_KRR.m at commit f57e5b7, no license · at the source

Overview

Authors: Anja Samardzija1, Xilin Shen2, Wenjing Luo1, Abigail S Greene3,4,5, Saloni Mehta2, Fuyuze Tokoglu2, Jagriti Arora2, Scott W Woods6, Rachel B Katz6, Gerard Sanacora6, Vinod H Srihari6, Dustin Scheinost1,2,3, R Todd Constable1,2,3
  1. Department of Biomedical Engineering, Yale University, New Haven, CT USA
  2. Department of Radiology and Biomedical Imaging, Yale School of Medicine, New Haven, CT USA
  3. Interdepartmental Neuroscience Program, Yale School of Medicine, New Haven, CT USA
  4. MD–PhD program, Yale School of Medicine, New Haven, CT USA
  5. Department of Psychiatry, Brigham & Women’s Hospital, Boston, MA USA
  6. Department of Psychiatry, Yale School of Medicine, New Haven, CT USA
Institutions: Yale University (United States); Brigham and Women's Hospital (United States)
Journal: Nature communications, volume 17, issue 1, article 7650
Dates: received 16 December 2024; accepted 20 May 2026; published online 16 June 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-73941-0 · PMID 42303975 · PMCID PMC13434263 · OpenAlex W7164878291
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: human (organism)
Methods: Statistics, Machine learning, Connectivity, fMRI & imaging
Keywords: Cognitive neuroscience, Computational neuroscience
MeSH: Brain*, Connectome*, Nerve Net*, Cognition, Female, Humans, Magnetic Resonance Imaging, Male, Models, Neurological (* major topic)
Topic: Chronic Disease Management Strategies (Epidemiology, Medicine), according to OpenAlex
Funding: NIMH NIH HHS (R01 MH121095); U.S. Department of Health & Human Services | NIH | National Institute of Mental Health (NIMH) (MH121095)
Citations: cited by 2 papers (Europe PMC); 105 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

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

YaleMRRC/testing_the_tests

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: f57e5b7eb0731255dcd3bfff45c0f4df9d3e0b4b, 14 April 2026
Languages: MATLAB (5)
Size: 24 files, 5 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, CITATION.cff
Not found: license file, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
6 files

Zenodo 19574108

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
6 files
At the source:

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-73941-0.

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:

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

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • no repository, dataset or request procedure was recognized in it

Read it in the paper: doi.org/10.1038/s41467-026-73941-0.

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, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 13 authors, 2 keywords, 9 MeSH terms, 2 funders, 83 references.

Cite

This paper

Samardzija, A., Shen, X., Luo, W., Greene, A. S., Mehta, S., Tokoglu, F., Arora, J., Woods, S. W., Katz, R. B., Sanacora, G., Srihari, V. H., Scheinost, D., & Constable, R. T. (2026). Using connectome-based predictive models to reveal the systems standardized tests and clinical symptoms are reflecting. Nature communications, 17(1), 7650. https://doi.org/10.1038/s41467-026-73941-0

BibTeX

@article{samardzija2026using,
author = {Samardzija, Anja and Shen, Xilin and Luo, Wenjing and Greene, Abigail S and Mehta, Saloni and Tokoglu, Fuyuze and Arora, Jagriti and Woods, Scott W and Katz, Rachel B and Sanacora, Gerard and Srihari, Vinod H and Scheinost, Dustin and Constable, R Todd},
title = {{Using connectome-based predictive models to reveal the systems standardized tests and clinical symptoms are reflecting}},
journal = {Nature communications},
year = {2026},
month = jun,
volume = {17},
number = {1},
pages = {7650},
publisher = {Nature Portfolio},
issn = {2041-1723},
doi = {10.1038/s41467-026-73941-0},
url = {https://doi.org/10.1038/s41467-026-73941-0},
pmid = {42303975},
pmcid = {PMC13434263}
}

RIS

TY - JOUR
AU - Samardzija, Anja
AU - Shen, Xilin
AU - Luo, Wenjing
AU - Greene, Abigail S
AU - Mehta, Saloni
AU - Tokoglu, Fuyuze
AU - Arora, Jagriti
AU - Woods, Scott W
AU - Katz, Rachel B
AU - Sanacora, Gerard
AU - Srihari, Vinod H
AU - Scheinost, Dustin
AU - Constable, R Todd
TI - Using connectome-based predictive models to reveal the systems standardized tests and clinical symptoms are reflecting
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/06/16
VL - 17
IS - 1
SP - 7650
SN - 2041-1723
PB - Nature Portfolio
DO - 10.1038/s41467-026-73941-0
UR - https://doi.org/10.1038/s41467-026-73941-0
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-73941-0",
"type": "article-journal",
"title": "Using connectome-based predictive models to reveal the systems standardized tests and clinical symptoms are reflecting",
"container-title": "Nature communications",
"author": [
{
"family": "Samardzija",
"given": "Anja"
},
{
"family": "Shen",
"given": "Xilin"
},
{
"family": "Luo",
"given": "Wenjing"
},
{
"family": "Greene",
"given": "Abigail S"
},
{
"family": "Mehta",
"given": "Saloni"
},
{
"family": "Tokoglu",
"given": "Fuyuze"
},
{
"family": "Arora",
"given": "Jagriti"
},
{
"family": "Woods",
"given": "Scott W"
},
{
"family": "Katz",
"given": "Rachel B"
},
{
"family": "Sanacora",
"given": "Gerard"
},
{
"family": "Srihari",
"given": "Vinod H"
},
{
"family": "Scheinost",
"given": "Dustin"
},
{
"family": "Constable",
"given": "R Todd"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "7650",
"DOI": "10.1038/s41467-026-73941-0",
"PMID": "42303975",
"PMCID": "PMC13434263",
"ISSN": "2041-1723",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41467-026-73941-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
16
]
]
}
}

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.1038/s41586-022-05118-w [code]
Brain-phenotype models fail for individuals who defy sample stereotypes.
Journal: Nature
In common: 13 references, 5 authors
[2] doi:10.1038/s44220-026-00623-7 [code]
Optimizing functional connectivity scanning conditions for predicting autistic traits.
Journal: Nature. Mental health
In common: 18 references, 3 authors
[3] doi:10.1016/j.neuroimage.2022.119364 [code]
Arousal impacts distributed hubs modulating the integration of brain functional connectivity.
Journal: NeuroImage
In common: 12 references, 2 authors
[4] doi:10.1162/imag_a_00540 [code]
Identifying dynamic reproducible brain states using a predictive modelling approach.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: 12 references, author R Todd Constable
[5] doi:10.1038/s42003-025-08231-4 [code]
Structural-functional brain network coupling during cognitive demand reveals intelligence-relevant communication strategies.
Journal: Communications biology
In common: 14 references
[6] doi:10.3389/frdem.2023.1126016 [code]
Connectome-based predictive modeling shows sex differences in brain-based predictors of memory performance.
Journal: Frontiers in dementia
In common: 7 references, 2 authors
[7] doi:10.1038/s41562-026-02447-y [code]
Feature selection leads to divergent neurobiological interpretations of brain-based machine learning biomarkers.
Journal: Nature human behaviour
In common: 10 references, author Dustin Scheinost
[8] doi:10.1016/j.patter.2023.100756 [code]
Connectome-based machine learning models are vulnerable to subtle data manipulations.
Journal: Patterns (New York, N.Y.)
In common: 10 references, author Dustin Scheinost
[9] doi:10.1038/s41467-022-29766-8 [code]
Shared and unique brain network features predict cognitive, personality, and mental health scores in the ABCD study.
Journal: Nature communications
In common: 13 references
[10] doi:10.1162/netn_a_00383 [code]
Network-level enrichment provides a framework for biological interpretation of machine learning results.
Journal: Network neuroscience (Cambridge, Mass.)
In common: 13 references

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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1038/s41467-026-73941-0.svg)](https://openscicode.org/badge/doi/10.1038/s41467-026-73941-0)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-73941-0.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41467-026-73941-0
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-73941-0"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-73941-0.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.