bijx.GaussianCDF

class bijx.GaussianCDF[source]

Bases: ScalarBijection

Bijection via Gaussian CDF with learnable location and scale.

Transforms unbounded inputs to the unit interval using the Gaussian cumulative distribution function. The transformation first standardizes inputs using learnable location and scale parameters, then applies the standard normal CDF.

Type: \([-\infty, \infty] \to [0, 1]\)

Transform: \(\Phi\left(\frac{x - \mu}{\sigma}\right)\) where \(\Phi\) is the standard Gaussian CDF

The log-Jacobian is the Gaussian log-PDF: \(\log \abs{f'(x)} = \log \phi\left(\frac{x - \mu}{\sigma}\right) - \log \sigma\)

Parameters:
  • scale (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Scale parameter specification, transformed to ensure positivity.

  • mean (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Mean parameter specification, no transformation by default.

  • transform_scale (Callable | None) – Function to ensure positive scale (default: softplus).

  • transform_mean (Callable | None) – Function to transform mean (default: None/identity).

  • rngs (Rngs) – Random number generators for parameter initialization.

Note

By default, the scale parameter is initialized to give unit scale after transformation, and the mean parameter is initialized to zero.

Example

>>> bijection = GaussianCDF(rngs=rngs)
>>> x = jnp.array([-2.0, 0.0, 2.0])
>>> y, log_det = bijection.forward(x, jnp.zeros(3))
>>> # y ≈ [0.023, 0.5, 0.977] (standard normal CDF values)
__init__(scale=(), mean=(), transform_scale=<PjitFunction of <function softplus>>, transform_mean=None, *, rngs=None)[source]
Parameters:
  • scale (Variable | Array | ndarray | Sequence[int | Any])

  • mean (Variable | Array | ndarray | Sequence[int | Any])

  • transform_scale (Callable | None)

  • transform_mean (Callable | None)

  • rngs (Rngs)

Methods

forward(x, log_density, **kwargs)

Apply forward transformation with log-density update.

fwd(x, **kwargs)

Apply forward transformation.

invert()

Create an inverted version of this bijection.

log_jac(x, y, **kwargs)

Compute log absolute determinant of the Jacobian.

rev(y, **kwargs)

Apply reverse (inverse) transformation.

reverse(y, log_density, **kwargs)

Apply reverse transformation with log-density update.

log_jac(x, y, **kwargs)[source]

Compute log absolute determinant of the Jacobian.

Parameters:
  • x – Input values where Jacobian is computed.

  • y – Output values corresponding to x (i.e., y = fwd(x)).

  • **kwargs – Additional transformation-specific arguments.

Returns:

Log absolute Jacobian determinant \(\log \abs{f'(x)}\) with same shape as x.

fwd(x, **kwargs)[source]

Apply forward transformation.

Parameters:
  • x – Input values to transform.

  • **kwargs – Additional transformation-specific arguments.

Returns:

Transformed values \(y = f(x)\) with same shape as \(x\).

rev(y, **kwargs)[source]

Apply reverse (inverse) transformation.

Parameters:
  • y – Output values to inverse-transform.

  • **kwargs – Additional transformation-specific arguments.

Returns:

Inverse-transformed values \(x = f^{-1}(y)\) with same shape as \(y\).