Source code for evaluators.evaluator

import abc
import numpy as np

[docs] class Evaluator(abc.ABC): r""" Abstract class for evaluating the model. """ @abc.abstractmethod def __call__(self, y_true:np.ndarray, y_pred:np.ndarray, x:np.ndarray) -> dict: """ Evaluate the model. Args: y_true (np.ndarray): The true target values. y_pred (np.ndarray): The predicted target values. Returns: Dict: The evaluation metrics. """ raise NotImplementedError
[docs] @abc.abstractmethod def print_metrics(self): """ Print the calculated metrics. """ raise NotImplementedError