astrodata.ml.metrics package¶
Submodules¶
astrodata.ml.metrics.BaseMetric module¶
- class astrodata.ml.metrics.BaseMetric.BaseMetric¶
Bases:
ABC
Abstract base class for metric objects.
Subclasses must implement initialization, call, name retrieval, and indicate if greater values are better.
- abstractmethod get_name()¶
Return the name of the metric.
- Returns:
The metric name.
- Return type:
str
- abstract property greater_is_better: bool¶
Whether higher metric values are better.
- Returns:
True if greater values are better, False otherwise.
- Return type:
bool
astrodata.ml.metrics.SklearnMetric module¶
- class astrodata.ml.metrics.SklearnMetric.SklearnMetric(metric, name=None, greater_is_better=True, **kwargs)¶
Bases:
BaseMetric
Adapter class for scikit-learn-style metrics.
Allows metric functions (such as those from sklearn.metrics) to be used as objects compatible with the BaseMetric interface.
- get_name()¶
Return the name of the metric.
- Returns:
The metric name.
- Return type:
str
- property greater_is_better: bool¶
Whether a higher metric value is better.
- Returns:
True if higher values are better; False otherwise.
- Return type:
bool