bijx.SinhConjugation

class bijx.SinhConjugation[source]

Bases: ScalarBijection

Sinh-based bijection using conjugation with arcsinh.

Type: [-∞, ∞] → [-∞, ∞] Transform: arcsinh(exp(mu) * (exp(nu) * sinh((x-loc)/alpha) + beta)) * alpha + loc

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

  • alpha (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Scale parameter (must be positive)

  • beta (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Offset parameter in sinh space

  • mu (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Log-scale parameter for outer stretch

  • nu (Union[Variable, Array, ndarray, Sequence[Union[int, Any]]]) – Log-scale parameter for inner stretch

__init__(loc=(), alpha=(), beta=(), mu=(), nu=(), alpha_transform=<function SinhConjugation.<lambda>>, mu_transform=<PjitFunction of <function arcsinh>>, nu_transform=<PjitFunction of <function arcsinh>>, 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])

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

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

  • alpha_transform (Callable | None)

  • mu_transform (Callable | None)

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