jax.scipy.special.betaincinv#
- jax.scipy.special.betaincinv(a, b, y)[source]#
The inverse of the regularized incomplete beta function in
x.JAX implementation of
scipy.special.betaincinv.Returns \(x \in [0, 1]\) such that \(\mathrm{betainc}(a, b, x) = y\). Equivalently,
betaincinv(a, b, y)is the quantile function of the beta distribution with shape parametersaandb.- Parameters:
a (ArrayLike) – arraylike, real-valued. Positive parameter a of the beta distribution.
b (ArrayLike) – arraylike, real-valued. Positive parameter b of the beta distribution.
y (ArrayLike) – arraylike, real-valued. Probability in the interval \([0, 1]\).
- Returns:
array containing values of the betaincinv function. Returns
0fory == 0and1fory == 1, andnanforyoutside \([0, 1]\),a <= 0,b <= 0, oraorbinfinite with0 < y < 1.- Return type:
Notes
The result is accurate to about the accuracy of
jax.scipy.special.betainc(), which decreases for largeaandb. Results smaller than the smallest positive normal number of the output dtype are returned as0.Gradients are only supported with respect to
y, as forjax.scipy.special.betainc(), which does not support gradients with respect toaandb.Examples
>>> y = jnp.array([0.0, 0.25, 0.5, 0.75, 1.0]) >>> with jnp.printoptions(precision=4): ... print(jax.scipy.special.betaincinv(2.0, 3.0, y)) [0. 0.243 0.3857 0.5437 1. ]