2022-03-25 11:42:31 +01:00

15 lines
361 B
Python

import abc
class ServiceEstimator(abc.ABC):
def __init__(self, estimator, classes):
self.__estimator = estimator
self.__classes = classes
@property
def estimator(self):
return self.__estimator
def predict(self, batch):
return [self.__classes[numeric_label] for numeric_label in self.estimator.predict(batch)]