interfaces.py 224 B

1234567891011
  1. from abc import ABC, abstractmethod
  2. class RecommendationMethod(ABC):
  3. @abstractmethod
  4. def fit(self, user_items_ratings):
  5. pass
  6. @abstractmethod
  7. def get_recommendations(self, user_id, n):
  8. pass