-
Pierre LOTTE authoredPierre LOTTE authored
base.py 797 B
"""
This module defines the basic behavior of a result class
"""
from typing import Iterable
class BaseResults():
"""
This class defines the behavior of result classes.
"""
def __init__(self, path: str, algos: Iterable[str], config_names: Iterable[str]) -> "BaseResults":
self.path = path
self.algos = algos
self.configs = config_names
self.result = {}
def compute(self, auto_split=False):
"""
This method is in charge of the computation of the metric. It will return nothing but will
print results to stdout and save figures and metrics on disk in the path given as a parameter
of the constructor.
"""
raise NotImplementedError("Please implement the compute method for this particular metric")