mne_connectivity.make_surrogate_data#
- mne_connectivity.make_surrogate_data(data, n_shuffles=1000, rng_seed=None, return_generator=True)[source]#
Create surrogate data for a null hypothesis of connectivity.
- Parameters:
- data
EpochsSpectrum|EpochsTFR The Fourier coefficients to create the null hypothesis surrogate data for. Can be generated from
mne.Epochs.compute_psd()ormne.Epochs.compute_tfr()withoutput='complex'.Note
Storing Fourier coefficients in
mne.time_frequency.EpochsSpectrumobjects requiresmne >= 1.8.- n_shuffles
int(default 1000) The number of surrogate datasets to create.
- rng_seed
int|None(defaultNone) The seed to use for the random number generator. If
None, no seed is specified.- return_generatorbool (default
True) Whether or not to return the surrogate data as a generator object instead of a list. This allows iterating over the surrogates without having to keep them all in memory.
- data
- Returns:
- surrogate_data
listofEpochsSpectrumorEpochsTFR The surrogate data for the null hypothesis with
n_shufflesentries. Returned as a generator ifreturn_generator=True.
- surrogate_data
Notes
Deprecated since version 0.9: This function was renamed to
make_surrogate_resting_data().