c3a6f53a6523a086752c07047c888a1019ba5773,recommenders/rating_prediction/base_rating_prediction.py,BaseRatingPrediction,__init__,#BaseRatingPrediction#Any#Any#Any#,7

Before Change


        self.train = ReadFile(train_file, self.space_type)
        self.train.main_information()

        if test_file != "":
            self.test = ReadFile(test_file, self.space_type)
            self.test.main_information()
            self.dataset_users = sorted(list(set(self.train.list_users + self.test.list_users)))
            self.dataset_items = sorted(list(set(self.train.list_items + self.test.list_items)))

        else:
            self.dataset_users = self.train.list_users
            self.dataset_items = self.train.list_items

        for item_id, item in enumerate(self.dataset_items):
            self.dict_item_id[item] = item_id

        for user_id, user in enumerate(self.dataset_users):

After Change


        for user_id, user in enumerate(self.train_users):
            self.map_users[user] = user_id

        for u, user in enumerate(self.train_users):
            for item in self.train_feedback[user]:
                self.matrix[u][self.map_items[item]] = self.train_feedback[user][item]

    def train_baselines(self):
        for i in xrange(10):
            self.compute_bi()
            self.compute_bu()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 10

Instances


Project Name: caserec/CaseRecommender
Commit Name: c3a6f53a6523a086752c07047c888a1019ba5773
Time: 2016-06-03
Author: fortes.arthur@gmail.com
File Name: recommenders/rating_prediction/base_rating_prediction.py
Class Name: BaseRatingPrediction
Method Name: __init__


Project Name: suavecode/SUAVE
Commit Name: 843753bc258e3054da0bf662576010163399d368
Time: 2014-04-04
Author: aerialhedgehog@gmail.com
File Name: trunk/SUAVE/Methods/Performance/evaluate_mission.py
Class Name:
Method Name: evaluate_mission


Project Name: ilastik/ilastik
Commit Name: f8ddf312461045425f54dcb5bd6c6f2fe8549718
Time: 2015-09-08
Author: jimmycc80@hotmail.com
File Name: lazyflow/operators/ioOperators/opStreamingMmfReader.py
Class Name: OpStreamingMmfReader
Method Name: execute


Project Name: tyarkoni/pliers
Commit Name: adbd6a626c97d7496fa18cb5ee848c8cb43d2201
Time: 2015-05-10
Author: tyarkoni@gmail.com
File Name: annotations/annotators/video.py
Class Name: DenseOpticalFlowAnnotator
Method Name: apply