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.
entr(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])
entr(x, out=None)
Elementwise function for computing entropy.
.. math:: \text{entr}(x) = \begin{cases} - x \log(x) & x > 0 \\ 0 & x = 0
\\ -\infty & \text{otherwise} \end{cases}
Parameters
----------
x : ndarray
Input array.
out : ndarray, optional
Optional output array for the function values
Returns
-------
res : scalar or ndarray
The value of the elementwise entropy function at the given points `x`.
See Also
--------
kl_div, rel_entr, scipy.stats.entropy
Notes
-----
.. versionadded:: 0.15.0
This function is concave.
The origin of this function is in convex programming; see [1]_.
Given a probability distribution :math:`p_1, \ldots, p_n`,
the definition of entropy in the context of *information theory* is
.. math::
\sum_{i = 1}^n \mathrm{entr}(p_i).
To compute the latter quantity, use `scipy.stats.entropy`.
References
----------
.. [1] Boyd, Stephen and Lieven Vandenberghe. *Convex optimization*.
Cambridge University Press, 2004.
:doi:`https://doi.org/10.1017/CBO9780511804441`
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 :