Aggregator#

class tpcp.validate.Aggregator(_value: T)[source]#

Base class for aggregators.

You can subclass this class to create your own aggregators. The only thing you should change, is to overwrite the aggregate method. Everything else should not be modified.

Custom aggregators can then be used to wrap return values of score functions or they can be passed as default_aggregator to the Scorer class.

Methods

aggregate(values, datapoints)

Aggregate the values.

get_value()

Return the value wrapped by aggregator.

__init__(_value: T) None[source]#
classmethod aggregate(values: Sequence[T], datapoints: Sequence[Dataset]) AggReturnType[source]#

Aggregate the values.

get_value() T[source]#

Return the value wrapped by aggregator.

Examples using tpcp.validate.Aggregator#

Custom Scorer

Custom Scorer

Tensorflow/Keras

Tensorflow/Keras