Module Expr Str Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias alias Assign NameStore Call AttributeLoad NameLoad attr keyword Num Print BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num Print BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Num keyword NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr ImportFrom alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword NameLoad ImportFrom alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Num keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Print BinOpMod Str BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Num keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Print BinOpMod Str BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad ImportFrom alias Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword AttributeLoad NameLoad attr keyword BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword Str keyword Str Expr Call NameLoad
N/A N/A 
Ward clustering to learn a brain parcellation from rest fMRI
====================================================================

We use spatially-constrained Ward-clustering to create a set of
parcels. These parcels are particularly interesting for creating a
'compressed' representation of the data, replacing the data in the fMRI
images by mean on the parcellation.

This parcellation may be useful in a supervised learning, see for
instance: `A supervised clustering approach for fMRI-based inference of
brain states <https://hal.inria.fr/inria-00589201>`_, Michel et al,
Pattern Recognition 2011.

 N/A numpy np nilearn datasets nilearn input_data nilearn.plotting plot_roi plot_epi show N/A nyu_dataset N/A N/A datasets fetch_nyu_rest n_subjects 1 N/A N/A First subject anatomical nifti image (3D) is at: %s N/A N/A nyu_dataset anat_anon N/A 0 N/A N/A First subject functional nifti image (4D) is at: %s N/A N/A nyu_dataset func N/A 0 N/A nifti_masker N/A N/A input_data NiftiMasker memory nilearn_cache mask_strategy epi memory_level 1 standardize False N/A func_filename N/A N/A nyu_dataset func N/A 0 N/A fmri_masked N/A N/A nifti_masker fit_transform func_filename N/A mask N/A N/A N/A N/A N/A nifti_masker mask_img_ get_data astype N/A np bool sklearn.feature_extraction image N/A shape N/A mask shape N/A connectivity N/A N/A image grid_to_graph n_x N/A shape N/A 0 n_y N/A shape N/A 1 n_z N/A shape N/A 2 mask mask sklearn.cluster FeatureAgglomeration N/A time N/A start N/A N/A time time N/A ward N/A FeatureAgglomeration n_clusters 1000 connectivity connectivity linkage ward memory nilearn_cache N/A N/A N/A ward fit fmri_masked N/A N/A Ward agglomeration 1000 clusters: %.2fs N/A N/A N/A time time start N/A start N/A N/A time time N/A ward N/A FeatureAgglomeration n_clusters 2000 connectivity connectivity linkage ward memory nilearn_cache N/A N/A N/A ward fit fmri_masked N/A N/A Ward agglomeration 2000 clusters: %.2fs N/A N/A N/A time time start N/A labels N/A N/A ward labels_ 1 N/A labels_img N/A N/A nifti_masker inverse_transform labels nilearn.image mean_img N/A mean_func_img N/A mean_img func_filename N/A first_plot N/A plot_roi labels_img mean_func_img title Ward parcellation display_mode xz N/A N/A N/A labels_img to_filename parcellation.nii N/A N/A plot_epi N/A N/A nifti_masker inverse_transform N/A fmri_masked N/A 0 cut_coords N/A first_plot cut_coords title N/A Original (%i voxels) N/A N/A fmri_masked shape N/A 1 display_mode xz N/A fmri_reduced N/A N/A ward transform fmri_masked N/A fmri_compressed N/A N/A ward inverse_transform fmri_reduced N/A compressed_img N/A N/A nifti_masker inverse_transform N/A fmri_compressed N/A 0 N/A N/A plot_epi compressed_img cut_coords N/A first_plot cut_coords title Compressed representation (2000 parcels) display_mode xz N/A N/A show