simulstream.metrics.stats.Stats

class simulstream.metrics.stats.Stats

Bases: object

Abstract base class for defining evaluation statistics.

Subclasses must implement: - name(): unique identifier of the statistic. - description(): a human-readable explanation. - compute(): logic to compute the metric from a LogReader.

__init__()

Methods

__init__()

compute(log_reader)

Compute the value of the statistic.

description()

The human-readable explanation of the statistic.

name()

The unique name of the statistic.

abstractmethod compute(log_reader: LogReader) float

Compute the value of the statistic.

Parameters:

log_reader (LogReader) – Reader object encapsulating log data.

Returns:

The computed value of the statistic.

Return type:

float

abstractmethod description() str

The human-readable explanation of the statistic.

abstractmethod name() str

The unique name of the statistic.