aquakin.compare_scenarios#
- aquakin.compare_scenarios(fn, scenarios, *, input_names, baseline=None, output_names=None, batched=True)[source]#
Run
fnunder several named scenarios and tabulate the outputs.- Parameters:
fn (callable) –
fn(x) -> outputas inmonte_carlo()/aquakin.dgsm().scenarios (dict) –
name -> overrideswhereoverridesis either a full input vector (lengthd) or a mapping{input_name: value}applied on top ofbaseline(so a scenario only states what it changes). An empty mapping{}is the baseline itself.input_names (sequence of str) – Names of the
dinputs (defines the vector order and the override keys).baseline (sequence of float, optional) – The nominal input vector that mapping-style overrides modify. Required if any scenario uses
{input_name: value}overrides; defaults to zeros.output_names (sequence of str, optional) – Output column names.
batched (bool) – vmap the scenarios (default) or evaluate one at a time.
- Return type: