315990901cdcdca241013ee5e6c581391bae2523,geomstats/geometry/spd_matrices.py,SPDMetricBuresWasserstein,inner_product,#SPDMetricBuresWasserstein#Any#Any#Any#,697

Before Change


        ones = gs.ones(eigvals.shape)
        vertical_index = gs.einsum("...i,...j->...ij", eigvals, ones)
        horizontal_index = gs.einsum("...j,...i->...ij", eigvals, ones)
        coefficients = 1 / (vertical_index + horizontal_index)

        result = gs.einsum("...ij,...ij,...ij->...",
                           coefficients, rotated_tangent_vec_a,
                           rotated_tangent_vec_b) / 2
        return result

    def exp(self, tangent_vec, base_point):

After Change


                                             eigvecs)
        rotated_tangent_vec_b = Matrices.mul(transp_eigvecs, tangent_vec_b,
                                             eigvecs)
        coefficients = 1 / (eigvals[..., :, None] + eigvals[..., None, :])

        result = gs.sum(coefficients * rotated_tangent_vec_a *
                        rotated_tangent_vec_b, axis=(-2, -1)) / 2
        return result

    def exp(self, tangent_vec, base_point):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: geomstats/geomstats
Commit Name: 315990901cdcdca241013ee5e6c581391bae2523
Time: 2020-12-15
Author: yann.thanwerdas@gmail.com
File Name: geomstats/geometry/spd_matrices.py
Class Name: SPDMetricBuresWasserstein
Method Name: inner_product


Project Name: geomstats/geomstats
Commit Name: 315990901cdcdca241013ee5e6c581391bae2523
Time: 2020-12-15
Author: yann.thanwerdas@gmail.com
File Name: geomstats/geometry/spd_matrices.py
Class Name: SPDMetricBuresWasserstein
Method Name: exp


Project Name: geomstats/geomstats
Commit Name: 315990901cdcdca241013ee5e6c581391bae2523
Time: 2020-12-15
Author: yann.thanwerdas@gmail.com
File Name: geomstats/geometry/spd_matrices.py
Class Name: SPDMetricBuresWasserstein
Method Name: inner_product


Project Name: SheffieldML/GPy
Commit Name: 6ed91ce102545bd90644906876e5e18affe82744
Time: 2014-11-20
Author: z.dai@sheffield.ac.uk
File Name: GPy/kern/_src/psi_comp/linear_psi_comp.py
Class Name:
Method Name: psiDerivativecomputations