frites.stats.permute_mi_trials#

frites.stats.permute_mi_trials(suj, inference='rfx', n_perm=1000, random_state=None)[source]#

Generate random partitions for swapping trials.

Parameters
sujnumpy:array_like

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

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 partitions for permuting trials