bayex.domain.Real#
- class bayex.domain.Real(lower, upper)#
Continuous real-valued domain with clipping.
Represents a parameter that can take real values within [lower, upper].
- __init__(lower, upper)#
Initializes a real domain with bounds.
- Parameters:
lower – Lower bound (inclusive).
upper – Upper bound (inclusive).
Methods
__init__(lower, upper)Initializes a real domain with bounds.
sample(key, shape)Samples uniformly from the domain.
transform(x)Clips values to the domain range [lower, upper].
- sample(key, shape)#
Samples uniformly from the domain.
- Parameters:
key (
Array) – JAX PRNGKey.shape (
Tuple) – Desired output shape.
- Returns:
Sampled values clipped to the domain.
- transform(x)#
Clips values to the domain range [lower, upper].
- Parameters:
x (
Array) – Input values.- Returns:
Clipped values within bounds.