abc
compression_safeguards.safeguards.abc
Abstract base class for the safeguards.
Classes:
-
Safeguard–Safeguard abstract base class.
Safeguard
Bases: ABC
Safeguard abstract base class.
Methods:
-
check–Check if the
approximationarray upholds the property enforced by this -
get_config–Returns the configuration of the safeguard.
-
from_config–Instantiate the safeguard from a configuration
dict.
late_bound
abstractmethod
property
The set of late-bound parameters that this safeguard has.
Late-bound parameters are only bound when checking and applying the safeguard, in contrast to the normal early-bound parameters that are configured during safeguard initialisation.
Late-bound parameters can be used for parameters that depend on the specific data that is to be safeguarded.
check
abstractmethod
check(
data: ndarray[S, dtype[T]],
approximation: ndarray[S, dtype[T]],
*,
late_bound: Bindings,
where: Literal[True] | ndarray[S, dtype[bool]] = True,
) -> bool
Check if the approximation array upholds the property enforced by this
safeguard.
| Parameters: |
|
|---|
| Returns: |
|
|---|