mesmer.distrib.Expression.evaluate_params#
- Expression.evaluate_params(coefficients_values, predictors_values, *, forced_shape=None)#
Evaluates the parameters for the provided predictors and coefficients
- Parameters:
coefficients_values (dict | xr.Dataset(c_i) | list of values) – Coefficient arrays or scalars. Can have the following form:
dict(c_i = values | np.array())
xr.Dataset(c_i)
list of values
predictors_values (dict | xr.Dataset) – Input arrays or scalars. Can be passed as
dict(pred_i = values or np.array())
xr.Dataset(pred_i)
forced_shape (None | tuple or list of dimensions) – coefficients_values and predictors_values for transposition of the shape. Can include additional axes like ‘realization’.
- Returns:
params (dict) – Realized parameters for the given expression, coefficients and covariates; to pass to the methods of
Expression(...).distrib, e.g.expression.distrib.ppf(**params).
Warning
with xarray objects for coefficients_values and predictors_values, the outputs will have for shape first the one of the coefficient, then the one of the predictors –> trying to avoid this issue with ‘forced_shape’