evaluma.metric_registry#
Metric name registry: maps names to optimization direction and natural bounds.
Attributes#
Functions#
|
Return |
|
Return |
Module Contents#
- evaluma.metric_registry.KNOWN_METRICS#
- evaluma.metric_registry._KNOWN_LIST = ''#
- evaluma.metric_registry.get_direction(metric_name: str) str#
Return
"min"or"max"for a known metric name.- Parameters:
metric_name – Metric identifier (case-insensitive).
- Returns:
"min"(lower is better) or"max"(higher is better).- Return type:
str
- Raises:
ValueError – If
metric_nameis not in the registry. The message lists all known names and suggests usingmetric_directionfor custom metrics.
- evaluma.metric_registry.get_natural_bounds(metric_name: str) tuple#
Return
(natural_low, natural_high)for a known metric name.natural_highisNonefor unbounded metrics (e.g.rmse,mae), meaning the upper bound must be supplied by the caller.- Parameters:
metric_name – Metric identifier (case-insensitive).
- Returns:
(float, float | None)natural lower and upper bounds.- Return type:
tuple
- Raises:
ValueError – If
metric_nameis not in the registry.