mne.stats.bootstrap_confidence_interval#

mne.stats.bootstrap_confidence_interval(arr, ci=0.95, n_bootstraps=2000, stat_fun='mean', *, rng=None, random_state=None)[source]#

Get confidence intervals from non-parametric bootstrap.

Parameters:
arrndarray, shape (n_samples, …)

The input data on which to calculate the confidence interval.

cifloat

Level of the confidence interval between 0 and 1.

n_bootstrapsint

Number of bootstraps.

stat_funstr | callable()

Can be “mean”, “median”, or a callable operating along axis=0.

rngNone | int | instance of Generator | RandomState

The random number generator (RNG). If None (default), a new numpy.random.Generator seeded from entropy is used. Pass an int or a numpy.random.Generator for reproducible results, or a legacy RandomState to control the random-number stream or for interoperability with third-party code such as scikit-learn that does not accept generators. An integer seed uses numpy.random.default_rng() and therefore produces a different stream than the same integer passed to a legacy random_state or seed parameter.

New in v1.13.

random_stateNone | int | instance of RandomState

Supported for compatibility. New code should use rng. If None, NumPy’s global RandomState is used.

Returns:
cisndarray, shape (2, …)

Containing the lower boundary of the CI at cis[0, ...] and the upper boundary of the CI at cis[1, ...].

Examples using mne.stats.bootstrap_confidence_interval#

Explore event-related dynamics for specific frequency bands

Explore event-related dynamics for specific frequency bands