8 lines
209 B
Python
8 lines
209 B
Python
from typing import Callable
|
|
|
|
from backend.metric.model import MetricValue
|
|
|
|
|
|
def get_metric(metric: Callable, y, y_pred) -> MetricValue:
|
|
return MetricValue(metric(y[0], y[1]), metric(y_pred[0], y_pred[1]))
|