bijx.CubicRational¶
- class bijx.CubicRational[source]¶
Bases:
ScalarBijectionModified rational transform with learnable parameters.
Type: [-∞, ∞] → [-∞, ∞] Transform: x + α*x/(1 + β*x²) with constrained α ∈ [-1,8], β > 0.
- __init__(loc=(), alpha=(), beta=(), alpha_transform=SigmoidTransform(low=-1, high=8, eps_low=0.001, eps_high=0.001), beta_transform=SoftplusTransform(eps=0.1), loc_transform=None, *, rngs=None)[source]¶
- Parameters:
loc (Variable | Array | ndarray | Sequence[int | Any])
alpha (Variable | Array | ndarray | Sequence[int | Any])
beta (Variable | Array | ndarray | Sequence[int | Any])
alpha_transform (Callable | None)
beta_transform (Callable | None)
loc_transform (Callable | None)
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.