Skip to content

Commit 47f72ab

Browse files
committed
ran linter
1 parent f5049be commit 47f72ab

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

bayesflow/adapters/transforms/standardize.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class Standardize(ElementwiseTransform):
1616
1717
z = (x - mean(x))/std(x)
1818
19-
Important to note that when specifying a mean and sd user should be careful to specify which variables should be standardized. Please see examples.
19+
Important to note that when specifying a mean and sd user should be careful to specify which variables should
20+
be standardized. Please see examples.
2021
2122
Parameters:
2223
mean: integer or float used to specify a mean if known but will be estimated from data when not provided
@@ -25,31 +26,35 @@ class Standardize(ElementwiseTransform):
2526
standardization happens individually for each dimension
2627
momentum: float in (0,1) specifying the momentum during training
2728
28-
Examples:
29+
Examples:
30+
31+
1) Standardize all variables using estimated mean and standard deviation
2932
30-
1) Standardize all variables using estimated mean and standard deviation
31-
3233
adapter = (
3334
bf.adapters.Adapter()
3435
.standardize()
3536
)
36-
3737
38-
2) Standardize all with same known mean and standard deviation. In this example all data is drawn from a standard normal
38+
39+
2) Standardize all with same known mean and standard deviation. In this example all data is drawn from a
40+
standard normal
3941
4042
adapter = (
4143
bf.adapters.Adapter()
4244
.standardize(mean = 1, sd = 0)
4345
)
44-
4546
46-
3) Mix of specified and auto-computed means/sds. Suppose we have priors for "beta" and "sigma" where we know the mean and standard deviations. However for our simulated data "x" and "y" the mean and standard deviations are unknown. Then standardize should be used in several stages specifying which variables to include or exclude.
47-
47+
48+
3) Mix of specified and auto-computed means/sds. Suppose we have priors for "beta" and "sigma" where we
49+
know the mean and standard deviations. However for our simulated data "x" and "y" the mean and standard
50+
deviations are unknown. Then standardize should be used in several stages specifying which variables to
51+
include or exclude.
52+
4853
adapter = (
4954
bf.adapters.Adapter()
5055
.standardize(include = "beta", mean = 1) # specify only mean/sd
51-
.standardize(include = "sigma", mean = 0.6, sd = 1) # specify both mean and sd
52-
.standardize(exclude = ["beta", "sigma"]) # specify neither mean nor sd
56+
.standardize(include = "sigma", mean = 0.6, sd = 1) # specify both mean and sd
57+
.standardize(exclude = ["beta", "sigma"]) # specify neither mean nor sd
5358
)
5459
5560
"""

0 commit comments

Comments
 (0)