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_names
list[str] List of variable names to intervene on.
- sweep_values
np.ndarray Array of sweep values.
- sweep_type
Literal[“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).
- var_names
- Returns:
xr.DatasetDataset containing the sensitivity analysis results.