Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.

3.1.1. fmralign.pairwise_alignment.PairwiseAlignment

class fmralign.pairwise_alignment.PairwiseAlignment(alignment_method='identity', n_pieces=1, clustering='kmeans', masker=None, n_jobs=1, verbose=0)[source][source]

Decompose the source and target images into regions and align corresponding regions independently.

__init__(alignment_method='identity', n_pieces=1, clustering='kmeans', masker=None, n_jobs=1, verbose=0)[source][source]

If n_pieces > 1, decomposes the images into regions and align each source/target region independantly.

Parameters:
alignment_method: string

Algorithm used to perform alignment between X_i and Y_i : * either ‘identity’, ‘scaled_orthogonal’, ‘optimal_transport’, ‘ridge_cv’, ‘diagonal’ * or an instance of one of alignment classes (imported from fmralign.alignment_methods)

n_pieces: int, optional (default = 1)

Number of regions in which the data is parcellated for alignment. If 1 the alignment is done on full scale data. If >1, the voxels are clustered and alignment is performed on each cluster applied to X and Y.

clusteringstring or 3D Niimg optional (defaultkmeans)

‘kmeans’, ‘ward’, ‘rena’, ‘hierarchical_kmeans’ method used for clustering of voxels based on functional signal, passed to nilearn.regions.parcellations If 3D Niimg, image used as predefined clustering, n_pieces is then ignored.

maskerNone or NiftiMasker or MultiNiftiMasker, or SurfaceMasker , optional

A mask to be used on the data. If provided, the mask will be used to extract the data. If None, a mask will be computed automatically with default parameters.

n_jobs: integer, optional (default = 1)

The number of CPUs to use to do the computation. -1 means ‘all CPUs’, -2 ‘all CPUs but one’, and so on.

verbose: integer, optional (default = 0)

Indicate the level of verbosity. By default, nothing is printed.