8e958d70fa54c0b249f7e6de27fd57cbaa7563d4,algorithm/rating/SlopeOne.py,SlopeOne,computeAverage,#SlopeOne#,14

Before Change


        self.computeAverage()

    def computeAverage(self):
        for i1 in range(len(self.dao.testSet_i.keys())):
            freq_sub = {}
            diffAverage_sub = {}
            for i2 in self.dao.testSet_i.keys()[i1:]:

After Change


                new_x1,new_x2 = qmath.common(self.dao.col(item),self.dao.col(item2))
                diff = new_x1 - new_x2
                if len(diff)==0:
                    diffAverage_sub.setdefault(self.dao.item[item2], 0)
                else:
                    diffAverage_sub.setdefault(self.dao.item[item2],diff.mean())
                freq_sub.setdefault(self.dao.item[item2],len(diff))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: Coder-Yu/RecQ
Commit Name: 8e958d70fa54c0b249f7e6de27fd57cbaa7563d4
Time: 2016-11-13
Author: fqq0429@gmail.com
File Name: algorithm/rating/SlopeOne.py
Class Name: SlopeOne
Method Name: computeAverage


Project Name: ntucllab/libact
Commit Name: 846c0f7de9946493e46888e6e1c1d6c0f8405239
Time: 2014-11-09
Author: yangarbiter@gmail.com
File Name: libact/query_strategies/query_by_committee.py
Class Name: QueryByCommittee
Method Name: disagreement


Project Name: arviz-devs/arviz
Commit Name: 259010ab242cc109b2b8dfbb20812d27b812dd14
Time: 2020-06-01
Author: aloctavodia@gmail.com
File Name: arviz/plots/loopitplot.py
Class Name:
Method Name: plot_loo_pit


Project Name: nilmtk/nilmtk
Commit Name: cd302eee53de29de903c5467d7686f75b0b65a6c
Time: 2015-09-21
Author: jack-list@xlk.org.uk
File Name: nilmtk/disaggregate/fhmm_exact.py
Class Name: FHMM
Method Name: disaggregate