b45f35862afbca09ff1c70be1cc4d1d6ca6c9617,pyriemann/classification.py,MDM,_predict_distances,#MDM#,46

Before Change



        for m in range(Nc):
            for k in range(Nt):
                dist[k, m] = distance(covtest[k, :, :], self.covmeans[m],
                                      metric=self.metric_dist)
        return dist

    def predict(self, covtest):
        dist = self._predict_distances(covtest)

After Change


    def _predict_distances(self, covtest):
        Nc = len(self.covmeans)

        if self.n_jobs == 1:
            dist = [distance(covtest, self.covmeans[m], self.metric_dist)
                    for m in range(Nc)]
        else:
            dist = Parallel(n_jobs=self.n_jobs)(delayed(distance)(covtest, self.covmeans[m], self.metric_dist) for m in range(Nc))

        dist = numpy.concatenate(dist, axis=1)
        return dist

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: alexandrebarachant/pyRiemann
Commit Name: b45f35862afbca09ff1c70be1cc4d1d6ca6c9617
Time: 2015-07-03
Author: alexandre.barachant@gmail.com
File Name: pyriemann/classification.py
Class Name: MDM
Method Name: _predict_distances


Project Name: rtqichen/torchdiffeq
Commit Name: 7391aec984c1e9e0899d51e6b0538483c37ec8fb
Time: 2020-07-27
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/adjoint.py
Class Name:
Method Name: odeint_adjoint


Project Name: aquaskyline/Clairvoyante
Commit Name: f5fe2bf2204d2223a6dcb9bd2a0b16c358ca2826
Time: 2018-03-23
Author: aquaskyline@gmail.com
File Name: dataPrepScripts/CreateTensor.py
Class Name:
Method Name: GenerateTensor