Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé
Module « scipy.stats »

Classe « PermutationMethod »

Informations générales

Héritage

builtins.object
    ResamplingMethod
        PermutationMethod

Définition

class PermutationMethod(ResamplingMethod):

help(PermutationMethod)

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_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.

    .. versionchanged:: 1.15.0

        As part of the `SPEC-007 <https://scientific-python.org/specs/spec-0007/>`_
        transition from use of `numpy.random.RandomState` to
        `numpy.random.Generator`, this attribute name was changed from
        `random_state` to `rng`. For an interim period, both names will continue to
        work, although only one may be specified at a time. After the interim
        period, uses of `random_state` will emit warnings. The behavior of both
        `random_state` and `rng` are outlined above, but only `rng` should be used
        in new code.

Constructeur(s)

Signature du constructeur Description
__init__(self, n_resamples=9999, batch=None, random_state=None, *, rng=None)

Liste des attributs statiques

Nom de l'attribut Valeur
batchNone
n_resamples9999

Liste des propriétés

Nom de la propriétéDescription
random_state
rng

Liste des opérateurs

Signature de l'opérateur Description
__eq__(self, other)

Opérateurs hérités de la classe object

__ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__repr__(self)

Méthodes héritées de la classe ResamplingMethod

__init_subclass__, __subclasshook__

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__

Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé