isc
isc(dms, pairwise=False, metric='correlation', n_jobs=-1)Compute inter-subject correlation (ISC) from data matrices.
For each vertex, compute either the correlation between all pairs of subjects (pairwise ISC) or the correlation between each subject and the average of the other subjects (one-vs-rest ISC).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| dms | array_like | Data matrices of shape (n_subjects, n_timepoints, n_vertices). | required |
| pairwise | bool | If True, compute pairwise ISC, which is the ISC between all pairs of subjects. Otherwise, compute one-vs-rest ISC, which is the ISC between each subject and the average of the other subjects. | False |
| metric | str | Distance metric to use for pairwise ISC. Can be ‘correlation’ or ‘cosine’. | 'correlation' |
| n_jobs | int | Number of jobs to run in parallel. If -1, use all available CPUs. | -1 |
Returns
| Name | Type | Description |
|---|---|---|
| isc | ndarray | ISC of shape (n_subjects, n_vertices) if pairwise is False, or (n_pairs_of_subjects, n_vertices) if pairwise is True. |