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 ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « scipy.stats.qmc »

Fonction update_discrepancy - module scipy.stats.qmc

Signature de la fonction update_discrepancy

def update_discrepancy(x_new: 'npt.ArrayLike', sample: 'npt.ArrayLike', initial_disc: float | numpy.floating | numpy.integer) -> float 

Description

help(scipy.stats.qmc.update_discrepancy)

Update the centered discrepancy with a new sample.

Parameters
----------
x_new : array_like (1, d)
    The new sample to add in `sample`.
sample : array_like (n, d)
    The initial sample.
initial_disc : float
    Centered discrepancy of the `sample`.

Returns
-------
discrepancy : float
    Centered discrepancy of the sample composed of `x_new` and `sample`.

Examples
--------
We can also compute iteratively the discrepancy by using
``iterative=True``.

>>> import numpy as np
>>> from scipy.stats import qmc
>>> space = np.array([[1, 3], [2, 6], [3, 2], [4, 5], [5, 1], [6, 4]])
>>> l_bounds = [0.5, 0.5]
>>> u_bounds = [6.5, 6.5]
>>> space = qmc.scale(space, l_bounds, u_bounds, reverse=True)
>>> disc_init = qmc.discrepancy(space[:-1], iterative=True)
>>> disc_init
0.04769081147119336
>>> qmc.update_discrepancy(space[-1], space[:-1], disc_init)
0.008142039609053513



Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé