Skip to content

Commit

Permalink
resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
eodole committed Dec 4, 2024
2 parents 62b1e1f + b8b6875 commit d7dd342
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
7 changes: 7 additions & 0 deletions bayesflow/adapters/transforms/as_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@
class AsSet(ElementwiseTransform):
"""
The `.as_set(["x", "y"])` transform indicates that both `x` and `y` are treated as sets.
<<<<<<< HEAD
That is, their values will be treated as *exchangable* such that they will imply the same inference regardless of
the values' order. This would be useful in a linear regression context where we can index the observations in
arbitrary order and always get the same regression line.
=======
That is, their values will be treated as *exchangable* such that they will imply
the same inference regardless of the values' order.
This is useful, for example, in a linear regression context where we can index
the observations in arbitrary order and always get the same regression line.
>>>>>>> b8b68757b0ae1a5f34bf656a837abbeb77e2ec62
Useage:
Expand Down
9 changes: 9 additions & 0 deletions bayesflow/adapters/transforms/concatenate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

@serializable(package="bayesflow.adapters")
class Concatenate(Transform):
<<<<<<< HEAD
"""Concatenate multiple arrays into a new key. Used to specify how data variables should be treated by the network.
Parameters:
Expand All @@ -23,6 +24,14 @@ class Concatenate(Transform):
Example:
Suppose you have a simulator that generates variables beta, sigma from priors and then observation
variables "x" and "y". We can then use concatonate in the following way
=======
"""Concatenate multiple arrays into a new key.
Parameters:

keys:

into:
>>>>>>> b8b68757b0ae1a5f34bf656a837abbeb77e2ec62

adapter = (
bf.Adapter()
Expand Down
9 changes: 6 additions & 3 deletions bayesflow/adapters/transforms/constrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@ class Constrain(ElementwiseTransform):
Examples:
Let sigma be the standard deviation of a normal distribution, then sigma should always be greater than zero.
Let sigma be the standard deviation of a normal distribution,
then sigma should always be greater than zero.
Useage:
Useage:
adapter = (
bf.Adapter()
.constrain("sigma", lower=0)
)
Suppose p is the parameter for a binomial distribution where p must be in [0,1] then we would constrain the
neural network to estimate p in the following way
Suppose p is the parameter for a binomial distribution where p must be in [0,1]
then we would constrain the neural network to estimate p in the following way.
Usage:
Usage:
adapter = (
bf.Adapter()
Expand Down
4 changes: 4 additions & 0 deletions bayesflow/adapters/transforms/keep.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ class Keep(Transform):
adapter = (
bf.adapters.Adapter()
<<<<<<< HEAD
# drop data from unneeded priors alpha, and r
=======
# only keep theta and x
>>>>>>> b8b68757b0ae1a5f34bf656a837abbeb77e2ec62
.keep(("theta", "x"))
)
Expand Down

0 comments on commit d7dd342

Please sign in to comment.