b6a4b26ea39c634adfc46b064375f4af30b7e7a3,Orange/distance/__init__.py,PearsonRAbsolute,__call__,#PearsonRAbsolute#Any#Any#Any#,217

Before Change


        where r is Pearson"s rank coefficient.
        
        x1 = e1.x if isinstance(e1, data.RowInstance) else e1.X
        x2 = e2.x if isinstance(e2, data.RowInstance) else e2.X if e2 is not None else x1
        if axis == 0:
            x1 = x1.T
            x2 = x2.T
        if x1.ndim == 1:

After Change


        
        x1 = _orange_to_numpy(e1)
        x2 = _orange_to_numpy(e2)
        if x2 is None:
            x2 = x1
        if axis == 0:
            x1 = x1.T
            x2 = x2.T
        if x1.ndim == 1:
            x1 = list([x1])
        if x2.ndim == 1:
            x2 = list([x2])
        rho = np.array([[stats.pearsonr(i, j)[0] for j in x2] for i in x1])
        if self.absolute:
            dist = (1. - np.abs(rho)) / 2.
        else:
            dist = (1. - rho) / 2.
        if isinstance(e1, data.Table) or isinstance(e1, data.RowInstance):
            dist = DistMatrix(dist, e1, e2)
        else:
            dist = DistMatrix(dist)
        return dist


PearsonR = PearsonDistance(absolute=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: biolab/orange3
Commit Name: b6a4b26ea39c634adfc46b064375f4af30b7e7a3
Time: 2014-12-19
Author: niko.colneric@gmail.com
File Name: Orange/distance/__init__.py
Class Name: PearsonRAbsolute
Method Name: __call__


Project Name: biolab/orange3
Commit Name: b6a4b26ea39c634adfc46b064375f4af30b7e7a3
Time: 2014-12-19
Author: niko.colneric@gmail.com
File Name: Orange/distance/__init__.py
Class Name: SpearmanRAbsolute
Method Name: __call__


Project Name: biolab/orange3
Commit Name: b6a4b26ea39c634adfc46b064375f4af30b7e7a3
Time: 2014-12-19
Author: niko.colneric@gmail.com
File Name: Orange/distance/__init__.py
Class Name: PearsonRAbsolute
Method Name: __call__


Project Name: biolab/orange3
Commit Name: b6a4b26ea39c634adfc46b064375f4af30b7e7a3
Time: 2014-12-19
Author: niko.colneric@gmail.com
File Name: Orange/distance/__init__.py
Class Name: Jaccard
Method Name: __call__