Beispiel #1
0
 def get_highest_online_project(self):
     from Recommender import is_online_project, recommend_default_online
     online_similar_projects = list(
         filter(lambda x: is_online_project(x[0]), self.projects_score))
     if len(online_similar_projects) == 0:
         return recommend_default_online(self.user_index)
     return online_similar_projects[0][0]
Beispiel #2
0
 def get_highest_online_project(self):
     from Recommender import is_online_project, recommend_default_online
     for project in self.score.index:
         if not is_online_project(project):
             self.score = self.score.drop(project)
     project = self.score.nlargest(1)
     if len(project) == 0:
         return recommend_default_online(self.user)
     return project.index[0]