xrspatial.mcda.sensitivity.sensitivity#
- xrspatial.mcda.sensitivity.sensitivity(criteria: Dataset, weights: dict[str, float], method: str = 'one_at_a_time', combine_method: str = 'wlc', delta: float = 0.05, n_samples: int = 1000, seed: int = 42, name: str = 'sensitivity') DataArray | Dataset[source]#
Assess how weight changes affect the suitability surface.
- Parameters:
criteria (xr.Dataset) – Standardized criterion layers.
weights (dict) – Base weights (must sum to ~1.0).
method (str) –
"one_at_a_time"or"monte_carlo".combine_method (str) – Combination function:
"wlc"or"wpm".delta (float) – Perturbation magnitude for one-at-a-time (default 0.05).
n_samples (int) – Number of random weight vectors for Monte Carlo (default 1000). Must be >= 1 when
method="monte_carlo".seed (int) – Random seed for Monte Carlo reproducibility.
name (str) – Name prefix for output arrays.
- Returns:
For
"one_at_a_time": Dataset with per-criterion DataArrays showing the absolute score difference under perturbation. For"monte_carlo": DataArray of per-pixel coefficient of variation across random weight samples.- Return type:
xr.Dataset or xr.DataArray