bijx.CubicConjugation

class bijx.CubicConjugation[source]

Bases: ScalarBijection

Cubic polynomial-based bijection.

Type: [-∞, ∞] → [-∞, ∞] Transform: Based on cubic polynomial a*x + b*x³ with conjugation offset

Parameters:
  • loc (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Location parameter (shift)

  • beta (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Offset parameter for conjugation

  • a (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Linear coefficient (must be positive)

  • b (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Cubic coefficient (must be positive)

__init__(loc=(), beta=(), a=(), b=(), a_transform=<PjitFunction of <function softplus>>, b_transform=<PjitFunction of <function softplus>>, rngs=None)[source]
Parameters:
  • loc (Variable | Array | ndarray | Sequence[int | Any])

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

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

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

  • a_transform (Callable | None)

  • b_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.

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\).