figaro.transform module¶
- figaro.transform.gradient_inv_jacobian(x, bounds, flag=True)[source]¶
logarithmic gradient of the probit transformation Jacobian
- Parameters:
x (np.ndarray) – sample(s) to evaluate the jacobian at
bounds (np.ndarray) – limits for each dimension (2d array, [[xmin, xmax], [ymin, ymax]…])
flag (bool) – whether to skip the evaluation
- Returns:
log jacobian (ones if flag is False)
- Return type:
np.ndarray
- figaro.transform.log2PI = 1.8378770664093453¶
//docs.scipy.org/doc/scipy/reference/generated/scipy.special.erf.html See notes there for cumulative of the unit normal distribution.
- Type:
Scipy’s implementation of ERF
- Type:
https
- figaro.transform.probit_logJ(x, bounds, flag=True)[source]¶
Jacobian of the probit transformation marginalised over dimensions
- Parameters:
x (np.ndarray) – sample(s) to evaluate the jacobian at
bounds (np.ndarray) – limits for each dimension (2d array, [[xmin, xmax], [ymin, ymax]…])
flag (bool) – whether to skip the evaluation
- Returns:
log jacobian (zeros if flag is False)
- Return type:
np.ndarray
- figaro.transform.probit_log_jacobian(x, bounds, flag=True)[source]¶
Jacobian of the probit transformation
- Parameters:
x (np.ndarray) – sample(s) to evaluate the jacobian at
bounds (np.ndarray) – limits for each dimension (2d array, [[xmin, xmax], [ymin, ymax]…])
flag (bool) – whether to skip the evaluation
- Returns:
log jacobian (zeros if flag is False)
- Return type:
np.ndarray
- figaro.transform.transform_from_probit(x, bounds)[source]¶
Coordinate change from probit to natural space. cdf_normal is the cumulative distribution function of the unit normal distribution.
x(t) = xmin + (xmax-xmin)*cdf_normal(t|0,1)
- Parameters:
x (np.ndarray) – sample(s) to antitransform (2d array)
bounds (np.ndarray) – limits for each dimension (2d array, [[xmin, xmax], [ymin, ymax]…])
- Returns:
sample(s)
- Return type:
np.ndarray
- figaro.transform.transform_to_probit(x, bounds)[source]¶
Coordinate change into probit space. cdf_normal is the cumulative distribution function of the unit normal distribution. WARNING: returns NAN if x is not in [xmin, xmax].
t(x) = cdf^-1_normal((x-x_min)/(x_max - x_min))
- Parameters:
x (np.ndarray) – sample(s) to transform (2d array)
bounds (np.ndarray) – limits for each dimension (2d array, [[xmin, xmax], [ymin, ymax]…])
- Returns:
sample(s)
- Return type:
np.ndarray