File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
bayesflow/adapters/transforms Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 99
1010@serializable (package = "bayesflow.adapters" )
1111class OneHot (ElementwiseTransform ):
12+ """
13+ Changes data to be one-hot encoded.
14+ """
15+
1216 def __init__ (self , num_classes : int ):
1317 super ().__init__ ()
1418 self .num_classes = num_classes
Original file line number Diff line number Diff line change 1010
1111@serializable (package = "bayesflow.adapters" )
1212class Standardize (ElementwiseTransform ):
13+ """
14+ Transform that when applied standardizes data using typical z-score standardization i.e. for some unstandardized data
15+ x the standardized version z would be
16+
17+ z = (x - mean(x))/std(x)
18+
19+ Parameters:
20+ mean: integer or float used to specify a mean if known but will be estimated from data when not provided
21+ std: integer or float used to specify a standard devation if known but will be estimated from data when not provided
22+ axis: integer representing a specific axis along which standardization should take place. By default
23+ standardization happens individually for each dimension
24+ momentum: float in (0,1) specifying the momentum during training
25+
26+ """
27+
1328 def __init__ (
1429 self ,
1530 mean : int | float | np .ndarray = None ,
You can’t perform that action at this time.
0 commit comments