Interval

class aixd.data.Interval(min_value: float | int = 0, max_value: float | int = 1, type: str = 'real')[source]

Bases: Domain

Defines a closed interval [a, b], for a <= b. The interval can either be defined on the real or integer numbers.

Parameters:
  • min_value (Union[float, int], optional, default=0) – The minimum value of the interval. If None, there is no minimum value.

  • max_value (Union[float, int], optional, default=1) – The maximum value of the interval. If None, there is no maximum value.

  • type (str, optional, default=”real”) – The type of the domain. Can be “real” or “integer”, defining whether the interval is defined on the real or integer numbers.

Methods

check_domain_consistency

Checks if the data is within the domain.

copy

Returns a copy of the instance.

domain_to_normalised

Maps from a distribution in [self.min_val, self.max_val] to [0, 1].

grid_samples

Returns samples chosen with grid sampling from the domain.

normalised_to_domain

Maps from a distribution in [0, 1] to [self.min_val, self.max_val]

random_samples

Returns samples chosen with random sampling from the domain.

sample_around

Returns samples chosen with a sample around strategy from the domain.

update_domain

Updates the domain according to the given data.