bayex.domain.Integer#

class bayex.domain.Integer(lower, upper)#

Discrete integer-valued domain with rounding and clipping.

Represents a parameter that can take integer values within [lower, upper].

__init__(lower, upper)#

Initializes an integer domain with bounds.

Parameters:
  • lower – Lower integer bound (inclusive).

  • upper – Upper integer bound (inclusive).

Methods

__init__(lower, upper)

Initializes an integer domain with bounds.

sample(key, shape)

Samples integers uniformly from the domain.

transform(x)

Rounds and clips values to the integer domain.

sample(key, shape)#

Samples integers uniformly from the domain.

Parameters:
  • key (Array) – JAX PRNGKey.

  • shape (Tuple) – Desired output shape.

Returns:

Sampled values clipped to valid integer range.

transform(x)#

Rounds and clips values to the integer domain.

Parameters:

x (Array) – Input values.

Returns:

Rounded and clipped values as float32.