We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8d7448 commit 7f90933Copy full SHA for 7f90933
bayesflow/adapters/transforms/keep.py
@@ -11,6 +11,27 @@
11
12
@serializable(package="bayesflow.adapters")
13
class Keep(Transform):
14
+ '''
15
+ Name the data parameters that should be kept for futher calculation.
16
+
17
+ Parameters:
18
19
+ cls: tuple containing the names of kept data variables as strings.
20
21
+ Example:
22
+ Two moons simulator generates data for priors alpha, r and theta as well as observation data x.
23
+ We are interested only in theta and x, to keep only theta and x we should use the following;
24
25
+ adapter = (
26
+ bf.adapters.Adapter()
27
28
+ # drop data from unneeded priors alpha, and r
29
+ .keep(("theta", "x"))
30
31
+ )
32
33
34
35
def __init__(self, keys: Sequence[str]):
36
self.keys = keys
37
0 commit comments