streamsight.registries.MetricEntry
- class streamsight.registries.MetricEntry(name: str, K: int | None = None)
Bases:
NamedTuple
Entry for the metric registry.
The intended use of this class is to store the name of the metric and the top K value for the metric specified by the user. Mainly this will happen during the building phase of the evaluator pipeline in
Builder
.- Parameters:
name (str) – Name of the algorithm
K (int, optional) – Top K value for the metric.
- __init__()
Methods
__init__
()count
(value, /)Return number of occurrences of value.
index
(value[, start, stop])Return first index of value.
Attributes
Alias for field number 1
Alias for field number 0
- K: int | None
Alias for field number 1
- _asdict()
Return a new dict which maps field names to their values.
- _field_defaults = {'K': None}
- _fields = ('name', 'K')
- classmethod _make(iterable)
Make a new MetricEntry object from a sequence or iterable
- _replace(**kwds)
Return a new MetricEntry object replacing specified fields with new values
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- name: str
Alias for field number 0