terraflow.sensitivity¶
Sobol' first-order / total-order indices and Morris elementary effects for ModelParams weights. Invoked from the CLI as terraflow sensitivity -c config.yml; results land in sensitivity_report.json in the run directory.
API Reference¶
sensitivity
¶
Sensitivity analysis module -- Sobol' and Morris methods via SALib.
run_sensitivity(config_path)
¶
Run sensitivity analysis and write sensitivity_report.json.
Loads config from config_path, validates the sensitivity: section
exists, runs Sobol' and/or Morris analysis per the method setting,
writes sensitivity_report.json atomically to output_dir, and
prints ranked parameter tables to stdout.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
Path
|
Path to a TerraFlow YAML config file that includes a |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
Absolute path to the written |
Raises:
| Type | Description |
|---|---|
ValueError:
|
If the config has no |
FileNotFoundError:
|
If config_path does not exist. |
Source code in terraflow/sensitivity.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | |