Standardize#
- class bayesflow.adapters.transforms.Standardize(mean: int | float | ndarray, std: int | float | ndarray)[source]#
Bases:
ElementwiseTransform
Transform that when applied standardizes data using typical z-score standardization with fixed means and std, i.e. for some unstandardized data x the standardized version z would be
>>> z = (x - mean(x)) / std(x)
Important: Ensure dynamic standardization (employed by BayesFlow approximators) has been turned off when using this transform.
- Parameters:
- meanint or float
Specifies the mean (location) of the transform.
- stdint or float
Specifies the standard deviation (scale) of the transform.
Examples
>>> adapter = bf.Adapter().standardize(include="beta", mean=5, std=10)