SensitivityAnalysis.run_sweep#

SensitivityAnalysis.run_sweep(var_names, sweep_values, sweep_type='multiplicative')[source]#

Run the model’s predict function over the sweep grid and store results.

Parameters:
var_nameslist[str]

List of variable names to intervene on.

sweep_valuesnp.ndarray

Array of sweep values.

sweep_typeLiteral[“multiplicative”, “additive”, “absolute”], optional

Type of intervention to apply, by default “multiplicative”. - ‘multiplicative’: Multiply the original predictor values by each sweep value. - ‘additive’: Add each sweep value to the original predictor values. - ‘absolute’: Set the predictor values directly to each sweep value (ignoring original values).

Returns:
xr.Dataset

Dataset containing the sensitivity analysis results.