Drop#
- class bayesflow.adapters.transforms.Drop(keys: Sequence[str])[source]#
Bases:
Transform
Transform to drop variables from further calculation.
- Parameters:
- keyssequence of str
Names of data variables that should be dropped
Examples
>>> import bayesflow as bf >>> a = [1, 2, 3, 4] >>> b = [[1, 2], [3, 4]] >>> c = [[5, 6, 7, 8]] >>> dat = dict(a=a, b=b, c=c) >>> dat {'a': [1, 2, 3, 4], 'b': [[1, 2], [3, 4]], 'c': [[5, 6, 7, 8]]} >>> drop = bf.adapters.transforms.Drop(("b", "c")) >>> drop.forward(dat) {'a': [1, 2, 3, 4]}