bijx.Sigmoid¶
- class bijx.Sigmoid[source]¶
Bases:
ScalarBijection
Sigmoid normalization transform.
Maps the real line to the unit interval using the logistic sigmoid function.
Type: \([-\infty, \infty] \to [0, 1]\)
Transform: \(\sigma(x) = \frac{1}{1 + e^{-x}}\)
Example
>>> bijection = Sigmoid() >>> x = jnp.array([-2.0, 0.0, 2.0]) >>> y, log_det = bijection.forward(x, jnp.zeros(3))
- __init__(*args, **kwargs)¶
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)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)[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.