logml.metrics.base
Classes
|
Base class for LogML metrics. |
- class logml.metrics.base.BaseMetric(**kwargs)
Bases:
object
Base class for LogML metrics.
- LABEL: str = None
- TASK: logml.common.ModelingTask = None
- REQUIRED: bool = True
- is_applicable(objective: logml.common.ModelingTask, y_true: Optional[numpy.ndarray] = None, y_pred: Optional[numpy.ndarray] = None, y_pred_proba: Optional[numpy.ndarray] = None, return_loss: Optional[bool] = None, return_score: Optional[bool] = None, **kwargs) bool
Checks if the metric is applible for the modeling problem at hand.
- get_value(y_true: Optional[numpy.ndarray] = None, y_pred: Optional[numpy.ndarray] = None, y_pred_proba: Optional[numpy.ndarray] = None, class_labels: Optional[list] = None, **kwargs)
Get metric value
- get_score(**kwargs)
Get metric value as score (the larger the better).
- get_loss(**kwargs)
Get metric value as loss (the smaller the better).
- get_scoring_fn() collections.abc.Callable
Returns standalone scoring function to be used in estimators, like PermutationFeatureExtractor.