bijx.Tan¶
- class bijx.Tan[source]¶
Bases:
ScalarBijection
Tangent-based unbounded transform.
Maps the unit interval to the real line using the tangent function. The transformation centers the input around 0.5, scales by π, then applies tangent to achieve the unbounded output domain.
Type: \([0, 1] \to [-\infty, \infty]\)
Transform: \(\tan(\pi(x - 0.5))\)
Example
>>> bijection = Tan() >>> x = jnp.array([0.25, 0.5, 0.75]) >>> 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, **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.