24d96c7ec2d80322ceb7a084199b891c9ebf88b9,pyod/models/sod.py,SOD,_snn,#SOD#,118

Before Change


            // it has the max possible value: 65535 (max unsigned int16)
            // so it"ll be always as first index
            _count[i:, range(i+1)] = list(_count[range(i), i]) + [np.iinfo(np.uint16).max]
            for j in range(i+1, n):
                _count[i, j] = _dist(ind[i], ind[j])

        return np.flip(np.argsort(_count), axis=1)[:, range(1, self.ref_set+1)]

    def _sod(self):
        

After Change


            // but we need it temporarily to maintain indices order,
            // it has the max possible value: 65535 (max unsigned int16)
            // so it"ll be always as first index
            temp = np.sum(np.isin(ind, ind[i]), axis=1).ravel()
            temp[i] = np.iinfo(np.uint16).max
            _count[i] = temp

        return np.flip(np.argsort(_count), axis=1)[:, range(1, self.ref_set + 1)]

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


Project Name: etal/cnvkit
Commit Name: 6372bff538de67595fda0183964a8df4b9b105fb
Time: 2016-12-08
Author: eric.talevich@gmail.com
File Name: cnvlib/antitarget.py
Class Name:
Method Name: get_background


Project Name: scikit-image/scikit-image
Commit Name: 1cc277630f2381f2ba0f01dcf833801a830f5c3b
Time: 2020-08-04
Author: rfezzani@gmail.com
File Name: skimage/metrics/_contingency_table.py
Class Name:
Method Name: contingency_table