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:
- arr
ndarray, shape (n_samples, …) The input data on which to calculate the confidence interval.
- ci
float Level of the confidence interval between 0 and 1.
- n_bootstraps
int Number of bootstraps.
- stat_fun
str|callable() Can be “mean”, “median”, or a callable operating along
axis=0.- rng
None|int| instance ofGenerator|RandomState The random number generator (RNG). If
None(default), a newnumpy.random.Generatorseeded from entropy is used. Pass an int or anumpy.random.Generatorfor reproducible results, or a legacyRandomStateto control the random-number stream or for interoperability with third-party code such as scikit-learn that does not accept generators. An integer seed usesnumpy.random.default_rng()and therefore produces a different stream than the same integer passed to a legacyrandom_stateorseedparameter.New in v1.13.
- random_state
None|int| instance ofRandomState Supported for compatibility. New code should use
rng. IfNone, NumPy’s globalRandomStateis used.
- arr
- Returns:
- cis
ndarray, shape (2, …) Containing the lower boundary of the CI at
cis[0, ...]and the upper boundary of the CI atcis[1, ...].
- cis
Examples using mne.stats.bootstrap_confidence_interval#
Explore event-related dynamics for specific frequency bands