Skip to content

Commit 9deda9d

Browse files
committed
explaination of purpose of ad_set with useage
1 parent fe048f7 commit 9deda9d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bayesflow/adapters/transforms/as_set.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55

66
class AsSet(ElementwiseTransform):
7+
"""
8+
The `.as_set(["x", "y"])` transform indicates that both `x` and `y` are treated as sets.
9+
That is, their values will be treated as *exchangable* such that they will imply the same inference regardless of the values' order.
10+
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.
11+
"""
12+
713
def forward(self, data: np.ndarray, **kwargs) -> np.ndarray:
814
return np.atleast_3d(data)
915

0 commit comments

Comments
 (0)