Log#

class bayesflow.adapters.transforms.Log(*, p1: bool = False)[source]#

Bases: ElementwiseTransform

Log transforms a variable.

Parameters:
p1boolean

Add 1 to the input before taking the logarithm?

Examples

>>> adapter = bf.Adapter().log(["x"])
forward(data: ndarray, **kwargs) ndarray[source]#
inverse(data: ndarray, **kwargs) ndarray[source]#
classmethod from_config(config: dict, custom_objects=None) Log[source]#
get_config() dict[source]#
__call__(data: ndarray, inverse: bool = False, **kwargs) ndarray#

Call self as a function.