coexist.combiners.Product#

class coexist.combiners.Product(weights=None)[source]#

Bases: object

Class for combining multiple errors by multiplying them.

The multi-objective functionality allows multiple error values to be calibrated / optimised at the same time.

Examples

Use the Product combiner in an ACCES run:

>>> import coexist
>>> access = coexist.Access("<simulation_script>")
>>> access.learn(
>>>     multi_objective = coexist.combiners.Product(),
>>>     random_seed = 42,
>>> )

To test what a combiner will output, use its .combine(errors) method - this is what will be called by ACCES:

>>> import coexist
>>> comb = coexist.combiners.Product(weights = [2, 3])
>>> errors = [2, 2]
>>> comb.combine(errors)
32.0
Attributes:
weights: float, optional

Raise each error to a power corresponding to its respective weight. If unset, all errors are multiplied with no exponentiation.

__init__(weights=None)[source]#

Methods

__init__([weights])

combine(errors)

Combine the given errors to a total error value.

combine(errors)[source]#

Combine the given errors to a total error value.