cf1f601ab89d89ec72ba009140470d4689553db1,caserec/recommenders/rating_prediction/svdplusplus.py,SVDPlusPlus,predict,#SVDPlusPlus#,112

Before Change


                    self.predictions.append((user, item, self._predict_svd_plus_plus(
                        self.map_users[user], self.map_items[item], sum_imp)))

            if self.prediction_file is not None:
                self.predictions = sorted(self.predictions, key=lambda x: x[0])
                WriteFile(self.prediction_file, self.predictions).write_recommendation()
            return self.predictions

    def execute(self):
        // methods

After Change



        if self.test_file is not None:
            for user in self.test_set["users"]:
                pu = self.p[self.user_to_user_id[user]] + self.y_sum_rows(self.user_to_user_id[user])

                for item in self.test_set["feedback"][user]:
                    self.predictions.append(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: caserec/CaseRecommender
Commit Name: cf1f601ab89d89ec72ba009140470d4689553db1
Time: 2018-02-16
Author: fortes.arthur@gmail.com
File Name: caserec/recommenders/rating_prediction/svdplusplus.py
Class Name: SVDPlusPlus
Method Name: predict


Project Name: caserec/CaseRecommender
Commit Name: cf1f601ab89d89ec72ba009140470d4689553db1
Time: 2018-02-16
Author: fortes.arthur@gmail.com
File Name: caserec/recommenders/item_recommendation/random_rec.py
Class Name: RandomRec
Method Name: predict


Project Name: caserec/CaseRecommender
Commit Name: cf1f601ab89d89ec72ba009140470d4689553db1
Time: 2018-02-16
Author: fortes.arthur@gmail.com
File Name: caserec/recommenders/item_recommendation/most_popular.py
Class Name: MostPopular
Method Name: predict