da2f578718eb773f419754a0a15f9fe42c0d5a10,grakel/kernels/random_walk.py,RandomWalk,pairwise_operation,#RandomWalk#Any#Any#,200

Before Change



            // XY is a square matrix
            s = XY.shape[0]
            Id = np.identity(s)

            if self.p is not None:
                P = np.eye(XY.shape[0])
                S = self._mu[0] * P
                for k in self._mu[1:]:
                    P *= XY
                    S += k*P
            else:
                if self.kernel_type == "geometric":
                    S = inv(Id - self.lamda*XY).T
                elif self.kernel_type == "exponential":
                    S = expm(self.lamda*XY).T

            p = np.ones(shape=(1, s))
            return p.dot(S).dot(p.T)
        elif self.method_type == "fast":
            // Spectral demoposition algorithm as presented in
            // [Vishwanathan et al., 2006] p.13, s.4.4, with
            // complexity of O((|E|+|V|)|E||V|^2) for graphs

After Change


                    S += k*P
            else:
                if self.kernel_type == "geometric":
                    S = inv(np.identity(s) - self.lamda*XY).T
                elif self.kernel_type == "exponential":
                    S = expm(self.lamda*XY).T

            return np.sum(S)
        elif self.method_type == "fast":
            // Spectral demoposition algorithm as presented in
            // [Vishwanathan et al., 2006] p.13, s.4.4, with
            // complexity of O((|E|+|V|)|E||V|^2) for graphs
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: ysig/GraKeL
Commit Name: da2f578718eb773f419754a0a15f9fe42c0d5a10
Time: 2018-08-24
Author: y.siglidis@gmail.com
File Name: grakel/kernels/random_walk.py
Class Name: RandomWalk
Method Name: pairwise_operation


Project Name: tensorflow/models
Commit Name: f8b0067f803286953f124c83d2a4e9ba4bd63a32
Time: 2017-06-27
Author: rathodv@google.com
File Name: object_detection/exporter_test.py
Class Name: FakeModel
Method Name: preprocess


Project Name: tensorflow/models
Commit Name: f33ffcc224fe6549bc2c10cf3597b702459d64fc
Time: 2017-06-27
Author: rathodv@google.com
File Name: object_detection/exporter_test.py
Class Name: FakeModel
Method Name: preprocess