diff --git a/bayesflow/data_adapters/transforms/constrain.py b/bayesflow/data_adapters/transforms/constrain.py index a20c8f2c..ea44f5e4 100644 --- a/bayesflow/data_adapters/transforms/constrain.py +++ b/bayesflow/data_adapters/transforms/constrain.py @@ -29,7 +29,7 @@ def __init__( raise ValueError("The lower bound must be strictly less than the upper bound.") match method: - case "default" | "sigmoid": + case "default" | "sigmoid" | "logit": def constrain(x): return (upper - lower) * sigmoid(x) + lower @@ -50,7 +50,7 @@ def constrain(x): def unconstrain(x): return inverse_softplus(x - lower) - case "exp": + case "exp" | "log": def constrain(x): return np.exp(x) + lower @@ -71,7 +71,7 @@ def constrain(x): def unconstrain(x): return -inverse_softplus(-(x - upper)) - case "exp": + case "exp" | "log": def constrain(x): return -np.exp(-x) + upper