jax.scipy.stats.bernoulli.logpmf

Contents

jax.scipy.stats.bernoulli.logpmf#

jax.scipy.stats.bernoulli.logpmf(k, p, loc=0)[source]#

Bernoulli log probability mass function.

JAX implementation of scipy.stats.bernoulli logpmf

The Bernoulli probability mass function is defined as

\[\begin{split}f(k) = \begin{cases} 1 - p, & k = 0 \\ p, & k = 1 \\ 0, & \mathrm{otherwise} \end{cases}\end{split}\]
Parameters:
Returns:

array of logpmf values

Return type:

Array