f7274c1889e6c31ab89dc0409fa2ac92e6f01228,pyod/models/sod.py,SOD,_snn,#SOD#,118

Before Change


            for j in range(n):
                _count.append(_dist(ind[i], ind[j]))
            // get the indices of points with most shared neighbours
            temp = sorted(range(len(_count)), key=_count.__getitem__, reverse=True)
            temp.remove(i)  // remove the point of being a reference to itself
            refSet[i]=temp[:self.ref_set]
        return refSet

After Change


        for i in range(n):
            // get the previous cached result
            // the point with itself needed to maintain indices order
            _count[i:, range(i+1)] = list(_count[range(i),i]) + [self.n_neighbors]
            for j in range(i+1, n):
                _count[i,j] = _dist(ind[i], ind[j])
        return np.flip(np.argsort(_count), axis=1)[:,range(self.ref_set)]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: yzhao062/pyod
Commit Name: f7274c1889e6c31ab89dc0409fa2ac92e6f01228
Time: 2019-03-11
Author: yalmardeny@tssg,org
File Name: pyod/models/sod.py
Class Name: SOD
Method Name: _snn


Project Name: dmnfarrell/pandastable
Commit Name: eb0395bdabc62a9d97f36fbe77aee6210362a858
Time: 2015-08-30
Author: farrell.damien@gmail.com
File Name: pandastable/plotting.py
Class Name: PlotViewer
Method Name: factorPlot


Project Name: rusty1s/pytorch_geometric
Commit Name: 77d71117720a8e7a35219a18531172ef4b83e08d
Time: 2018-05-12
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/data/split.py
Class Name:
Method Name: data_from_set