frites.stats.permute_mi_vector#

frites.stats.permute_mi_vector(y, suj, mi_type='cc', inference='rfx', n_perm=1000, random_state=None)[source]#

Permute regressor variable for performing non-parameteric statistics.

Parameters
ynumpy:array_like

Array of shape (n_epochs,) to be permuted

sujnumpy:array_like

Array of shape (n_epochs,) used for permuting per subject

mi_type{‘cc’, ‘cd’, ‘ccd’}

Mutual information type

inference{‘ffx’, ‘rfx’}

Inference type (fixed or random effect)

n_permpython:int | 1000

Number of permutations to return

random_statepython:int | python:None

Fix the random state of the machine (use it for reproducibility). If None, a random state is randomly assigned.

Returns
y_ppython:list

List of length (n_perm,) of random permutation of the regressor