CompositeObjective#
- class hydromodpy.calibration.CompositeObjective(blocks, *, name='composite', transform='identity')[source]#
Bases:
objectWeighted composite of several
ScalarObjectiveblocks.Each block is a
(ScalarObjective, weight)tuple.evaluate()runs every block on the sameSimulationOutput, optionally applies a per-blocktransformto the block total cost, then returns a singleObjectiveValuewhose.totalis the weighted sum of the transformed block totals and.componentsmerges every block’s components. Weights are normalised so they sum to 1.0.Parameters#
- blocks
Iterable of
(ScalarObjective, weight)tuples. Weights must be strictly positive and finite.- name
Optional label for the composite (default:
"composite").- transform
One of
"identity","log","inverse"(case-insensitive). Applied to each block’s cost before weighting. Default"identity".
Notes#
This class implements the
ObjectiveProtocol and can therefore be plugged directly into the calibration engine wherever aScalarObjectivewould be accepted.- param blocks:
- type blocks:
- param name:
- type name:
- param transform:
- type transform: