hydromodpy.calibration.objective#

Objective Protocol - computes a cost from observed vs simulated data.

The calibration engine only requires an object with evaluate(sim) -> float or evaluate(sim) -> dict (multi-objective). ObservationSet and SimulationOutput are the standard payloads but any callable-like object matching the Protocol is accepted.

Functions

build_objective_from_config(cfg)

Assemble an Objective from a CalibrationConfig.

evaluate_objective(obj, sim)

Normalize return types from user-defined Objective implementations.

Classes

CompositeObjective(blocks, *[, name, transform])

Weighted composite of several ScalarObjective blocks.

ConfigBlockObjective(*, name, metric, ...[, ...])

Objective for one [[calibration.objective_blocks]] declaration.

Objective(*args, **kwargs)

Protocol for calibration objectives.

ObjectiveValue(total[, components, vector])

Minimization cost returned by an objective.

ObservationSet(stations, times, values, variable)

Observed time series used to score one simulated variable.

ScalarObjective(observations, *[, metric, ...])

Single metric objective over one observation set.

SimulationOutput(sim_id, stations, times, values)

Simulated values aligned with an ObservationSet.