IntervalMasked

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

Bases: Interval

A domain that allows to define an interval with several options/masks, not in the interval. Can be used to define a masked interval, e.g., [1.2, 2.2] with 0 as options/mask.

For an example usage of this domain, refer to the Semiramis example in the documentation.

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

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

  • 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.

  • options (List, optional, default=None) – The list of options/masks, not in the interval.

Methods

copy

Returns a copy of the instance.

Inherited Methods

check_domain_consistency

Checks if the data is within the domain.

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.