PermutationMethod#
- class scipy.stats.PermutationMethod(n_resamples=9999, batch=None, random_state=None)[source]#
Configuration information for a permutation hypothesis test.
Instances of this class can be passed into the method parameter of some hypothesis test functions to perform a permutation version of the hypothesis tests.
- 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
, numpy.random.RandomState
}, optionalPseudorandom number generator state used to generate resamples.
If
random_state
is already aGenerator
orRandomState
instance, then that instance is used. Ifrandom_state
is an int, a newRandomState
instance is used, seeded withrandom_state
. Ifrandom_state
isNone
(default), thenumpy.random.RandomState
singleton is used.