{ } Raw JSON

bundles / scipy latest / scipy / stats / _resampling / PermutationMethod

class

scipy.stats._resampling:PermutationMethod

source: /scipy/stats/_resampling.py :2240

Signature

class   PermutationMethod ( n_resamples = 9999 batch = None random_state = None * rng = None )

Members

Summary

Configuration information for a permutation hypothesis test.

Extended Summary

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_resamples : int, optional

The number of resamples to perform. Default is 9999.

batch : int, 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.

rng : `numpy.random.Generator`, optional

Pseudorandom number generator used to perform resampling.

If rng is passed by keyword to the initializer or the rng attribute is used directly, types other than numpy.random.Generator are passed to numpy.random.default_rng to instantiate a Generator before use. If rng is already a Generator instance, then the provided instance is used. Specify rng for repeatable behavior.

If this argument is passed by position, if random_state is passed by keyword into the initializer, or if the random_state attribute is used directly, legacy behavior for random_state applies:

  • If random_state is None (or numpy.random), the numpy.random.RandomState singleton is used.

  • If random_state is an int, a new RandomState instance is used, seeded with random_state.

  • If random_state is already a Generator or RandomState instance then that instance is used.

Aliases

  • scipy.stats.PermutationMethod

Referenced by