

def precompute(self, vote_list=None):
    '\n        This function will be called by the task manager in order\n        to compile and store the results.\n\n        Returns a dictionary contains count of recommended and similar items\n        ::\n            {<similar_count>: XX, <recommend_count>: XX}\n        '
    if (vote_list is None):
        logger.info('fetching votes from the provider...')
        vote_list = self.vote_list()
    logger.info('calculating similarities...')
    self.algorithm.clear_cache()
    itemMatch = self.algorithm.calculate_similarities(vote_list)
    logger.info('saving similarities...')
    self.pre_store_similarities(itemMatch)
    self.storage.store_similarities(itemMatch)
    logger.info('fetching ignored items...')
    itemIgnored = self.items_ignored()
    logger.info('saving recommendations...')
    recommendItems = self.algorithm.calculate_recommendations(vote_list, itemMatch, itemIgnored)
    self.storage.store_recommendations(recommendItems)
    return {
        'similar_count': len(itemMatch),
        'recommend_count': len(recommendItems),
    }

dataset/ETHPy150Open fcurella/django-recommends/recommends/providers/__init__.py RecommendationProvider.precompute/original