Custom

class pmrf.constraints.Custom(bijector: AbstractBijector, bounds: tuple[PyTree, PyTree] = (Array(-inf, dtype=float64, weak_type=True), Array(inf, dtype=float64, weak_type=True)), base_bounds: tuple[PyTree, PyTree] | None = None, base_bijector: AbstractBijector | None = None)

Bases: AbstractConstraint

An escape hatch for power users who need a specific distreqx bijector mapping with predefined physical bounds.

Attributes:
bijector: The internal, user-defined distreqx bijector mapping from the

unconstrained real line to the physical space.

bounds: The manually defined physical boundaries (lower, upper),

each a PyTree matching the constrained value’s structure.

base_bounds: The orthogonal base boundaries. Defaults to bounds if omitted. base_bijector: The bijector mapping from base_bounds to bounds.

Defaults to Identity if omitted.

Args:

bijector: The custom distreqx bijector. bounds: A tuple of (lower, upper) defining the physical

boundaries of the constrained space, each a PyTree matching the constrained value’s structure. Defaults to (-inf, inf).

base_bounds: Optional. A tuple of (lower, upper) defining the orthogonal

base boundaries. If None, defaults to bounds.

base_bijector: Optional. The bijector handling spatial skew/correlation.

If None, defaults to distreqx.bijectors.Identity.

base_bijector: AbstractBijector
base_bounds: tuple[PyTree, PyTree]
bijector: AbstractBijector
bounds: tuple[PyTree, PyTree]