Group#
- class bayesflow.adapters.transforms.Group(keys: Sequence[str], into: str, prefix: str = '')[source]#
Bases:
Transform
Groups the given variables as a dictionary in the key into. As most transforms do not support nested structures, this should usually be the last transform.
- Parameters:
- keysSequence of str
The names of the variables to group together.
- intostr
The name of the variable to store the grouped variables in.
- prefixstr, optional
A common prefix of the ungrouped variable names, which will be removed after grouping.
- Raises:
- ValueError
If a prefix is specified, but a provided key does not start with the prefix.
- log_det_jac(data: dict[str, any], log_det_jac: dict[str, any], inverse: bool = False, **kwargs)[source]#