scipy.stats.

BootstrapMethod#

class scipy.stats.BootstrapMethod(n_resamples=9999, batch=None, random_state=None, method='BCa')[source]#

Configuration information for a bootstrap confidence interval.

Instances of this class can be passed into the method parameter of some confidence interval methods to generate a bootstrap confidence interval.

Attributes:
n_resamplesint, optional

The number of resamples to perform. Default is 9999.

batchint, optional

The number of resamples to process in each vectorized call to the statistic. Batch sizes >>1 tend to be faster when the statistic is vectorized, but memory usage scales linearly with the batch size. Default is None, which processes all resamples in a single batch.

random_state{None, int, numpy.random.Generator,

Pseudorandom number generator state used to generate resamples.

If random_state is already a Generator or RandomState instance, then that instance is used. If random_state is an int, a new RandomState instance is used, seeded with random_state. If random_state is None (default), the numpy.random.RandomState singleton is used.

method{‘bca’, ‘percentile’, ‘basic’}

Whether to use the ‘percentile’ bootstrap (‘percentile’), the ‘basic’ (AKA ‘reverse’) bootstrap (‘basic’), or the bias-corrected and accelerated bootstrap (‘BCa’, default).