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.

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.