@@ -449,19 +449,19 @@ def benchmark_reproducibility(comb, modality, alg, par_dict, disc,
449449 with open (label_file , 'r+' ) as f :
450450 node_dict = json .load (f )
451451 indices = [i ['index' ] for i in
452- node_dict . values () ]
452+ node_dict ]
453453 if indices == ixs :
454454 coords = [i ['coord' ] for i in
455- node_dict . values () ]
455+ node_dict ]
456456
457457 df_coords = pd .DataFrame (
458458 [str (tuple (x )) for x in
459459 coords ]).T
460460 df_coords .columns = [f"rsn-{ comb_tuple [0 ]} _res-{ comb_tuple [- 2 ]} _{ i } " for i in ixs ]
461461 labels = [
462- list (i ['label' ]. values () )[7 ] for i
462+ list (i ['label' ])[7 ] for i
463463 in
464- node_dict . values () ]
464+ node_dict ]
465465
466466 df_labels = pd .DataFrame (
467467 labels ).T
@@ -520,7 +520,6 @@ def benchmark_reproducibility(comb, modality, alg, par_dict, disc,
520520 df_summary .at [0 , f"{ lp } _icc" ] = np .nan
521521 coord_in = np .nan
522522 label_in = np .nan
523- del c_icc
524523
525524 dict_sum [f"{ lp } _coord" ] = coord_in
526525 dict_sum [f"{ lp } _label" ] = label_in
@@ -593,11 +592,11 @@ def benchmark_reproducibility(comb, modality, alg, par_dict, disc,
593592if __name__ == "__main__" :
594593 __spec__ = "ModuleSpec(name='builtins', loader=<class '_" \
595594 "frozen_importlib.BuiltinImporter'>)"
596- base_dir = '/scratch/04171/dpisner/HNU/HNU_outs/triple'
597- # base_dir = '/scratch/04171/dpisner/HNU/HNU_outs/outputs_language'
595+ # base_dir = '/scratch/04171/dpisner/HNU/HNU_outs/triple'
596+ base_dir = '/scratch/04171/dpisner/HNU/HNU_outs/outputs_language'
598597 thr_type = "MST"
599- icc = False
600- disc = True
598+ icc = True
599+ disc = False
601600 int_consist = False
602601 target_modality = 'dwi'
603602
@@ -606,8 +605,10 @@ def benchmark_reproducibility(comb, modality, alg, par_dict, disc,
606605 #embedding_types = ['OMNI']
607606 embedding_types = ['OMNI' , 'ASE' ]
608607 modalities = ['func' , 'dwi' ]
609- rsns = ['kmeans' ]
610- #rsns = ['language']
608+ #rsns = ['kmeans', 'triple']
609+ #rsns = ['triple']
610+ #rsns = ['kmeans']
611+ rsns = ['language' ]
611612 #template = 'CN200'
612613 template = 'MNI152_T1'
613614 mets = ["global_efficiency" ,
@@ -719,7 +720,7 @@ def tuple_insert(tup, pos, ele):
719720 cache_dir = tempfile .mkdtemp ()
720721
721722 with Parallel (
722- n_jobs = 128 , require = "sharedmem" , backend = 'threading' ,
723+ n_jobs = - 1 , require = "sharedmem" , backend = 'threading' ,
723724 verbose = 10 , max_nbytes = '20000M' ,
724725 temp_folder = cache_dir
725726 ) as parallel :
@@ -734,8 +735,8 @@ def tuple_insert(tup, pos, ele):
734735 # outs = []
735736 # for comb in grid:
736737 # outs.append(benchmark_reproducibility(
737- # comb, modality, alg, par_dict ,
738- # disc, final_missingness_summary,
738+ # comb, modality, alg, sub_dict_clean ,
739+ # disc, final_missingness_summary, icc_tmps_dir,
739740 # ))
740741 df_summary = pd .concat ([i for i in outs if i is not None and not i .empty ], axis = 0 )
741742 df_summary = df_summary .dropna (axis = 0 , how = 'all' )
0 commit comments