Vous êtes un professionnel et vous avez besoin d'une formation ?
Programmation Python
Les compléments
Voir le programme détaillé
Module « scipy.special »
Signature de la fonction log_ndtr
def log_ndtr(*args, **kwargs)
Description
help(scipy.special.log_ndtr)
log_ndtr(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])
log_ndtr(x, out=None)
Logarithm of Gaussian cumulative distribution function.
Returns the log of the area under the standard Gaussian probability
density function, integrated from minus infinity to `x`::
log(1/sqrt(2*pi) * integral(exp(-t**2 / 2), t=-inf..x))
Parameters
----------
x : array_like, real or complex
Argument
out : ndarray, optional
Optional output array for the function results
Returns
-------
scalar or ndarray
The value of the log of the normal CDF evaluated at `x`
See Also
--------
erf
erfc
scipy.stats.norm
ndtr
Examples
--------
>>> import numpy as np
>>> from scipy.special import log_ndtr, ndtr
The benefit of ``log_ndtr(x)`` over the naive implementation
``np.log(ndtr(x))`` is most evident with moderate to large positive
values of ``x``:
>>> x = np.array([6, 7, 9, 12, 15, 25])
>>> log_ndtr(x)
array([-9.86587646e-010, -1.27981254e-012, -1.12858841e-019,
-1.77648211e-033, -3.67096620e-051, -3.05669671e-138])
The results of the naive calculation for the moderate ``x`` values
have only 5 or 6 correct significant digits. For values of ``x``
greater than approximately 8.3, the naive expression returns 0:
>>> np.log(ndtr(x))
array([-9.86587701e-10, -1.27986510e-12, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00])
Vous êtes un professionnel et vous avez besoin d'une formation ?
Sensibilisation àl'Intelligence Artificielle
Voir le programme détaillé
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 :