FilterTransform#

class bayesflow.adapters.transforms.FilterTransform(include: str | Sequence[str] = None, *, transform_constructor: Callable[[...], ElementwiseTransform], predicate: Predicate = None, exclude: str | Sequence[str] = None, transform_map: Mapping[str, ElementwiseTransform] = None, **kwargs)[source]#

Bases: Transform

Implements a transform that applies a different transform on a subset of the data.

Used by other transforms and base adapter class.

extra_repr() str[source]#
get_config() dict[source]#
forward(data: dict[str, ndarray], *, strict: bool = True, **kwargs) dict[str, ndarray][source]#
inverse(data: dict[str, ndarray], *, strict: bool = False, **kwargs) dict[str, ndarray][source]#
__call__(data: dict[str, ndarray], *, inverse: bool = False, **kwargs) dict[str, ndarray]#

Call self as a function.

classmethod from_config(config: dict, custom_objects=None)#