bundles / scipy 1.17.1 / scipy / stats / _resampling / BootstrapMethod
class
scipy.stats._resampling:BootstrapMethod
Signature
class BootstrapMethod ( n_resamples = 9999 , batch = None , random_state = None , method = BCa , * , rng = None ) Members
Summary
Configuration information for a bootstrap confidence interval.
Extended Summary
Instances of this class can be passed into the method parameter of some confidence interval methods to generate a bootstrap confidence interval.
Attributes
n_resamples: int, optionalThe number of resamples to perform. Default is 9999.
batch: int, optionalThe 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.rng: `numpy.random.Generator`, optionalPseudorandom number generator used to perform resampling.
If
rngis passed by keyword to the initializer or therngattribute is used directly, types other than numpy.random.Generator are passed to numpy.random.default_rng to instantiate aGeneratorbefore use. Ifrngis already aGeneratorinstance, then the provided instance is used. Specifyrngfor repeatable behavior.If this argument is passed by position, if
random_stateis passed by keyword into the initializer, or if therandom_stateattribute is used directly, legacy behavior forrandom_stateapplies:If
random_stateis None (or numpy.random), the numpy.random.RandomState singleton is used.If
random_stateis an int, a newRandomStateinstance is used, seeded withrandom_state.If
random_stateis already aGeneratororRandomStateinstance then that instance 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).
Aliases
-
scipy.stats.BootstrapMethod