b6a4b26ea39c634adfc46b064375f4af30b7e7a3,Orange/distance/__init__.py,Jaccard,__call__,#Jaccard#Any#Any#Any#,70

Before Change


    Jaccard distance
    def __call__(self, e1, e2=None, axis=1):
        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 None
        if axis == 0:
            x1 = x1.T
            if x2 is not None:
                x2 = x2.T

After Change



    def __call__(self, e1, e2=None, axis=1, **kwargs):
        x1 = _orange_to_numpy(e1)
        x2 = _orange_to_numpy(e2)
        if axis == 0:
            x1 = x1.T
            if x2 is not None:
                x2 = x2.T
        if not sparse.issparse(x1):
            x1 = np.atleast_2d(x1)
        if e2 is not None and not sparse.issparse(x2):
            x2 = np.atleast_2d(x2)
        dist = metrics.pairwise.pairwise_distances(x1, x2, metric=self.metric, **kwargs)
        if isinstance(e1, data.Table) or isinstance(e1, data.RowInstance):
            dist = DistMatrix(dist, e1, e2)
        else:
            dist = DistMatrix(dist)
        return dist


class SklMahalanobis(SklDistance):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

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: Jaccard
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: 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: Jaccard
Method Name: __call__