be291b6a6ab8a663beac72fefa213bc7216a1617,geomstats/learning/frechet_mean.py,,_ball_gradient_descent,#Any#Any#Any#Any#Any#Any#,177
Before Change
while convergence > tau and max_iter > iteration:
iteration += 1
grad_tangent = 2 * log(torch.from_numpy(gs.repeat(barycenter, len(points), axis = 0)),
torch.from_numpy(points)) * torch.from_numpy(weights)
grad_tangent = grad_tangent.data.numpy()
cc_barycenter = exp(torch.from_numpy(barycenter),
torch.from_numpy(lr * grad_tangent.sum(0, keepdims=True)))
cc_barycenter = cc_barycenter.data.numpy()
After Change
barycenter_gs = gs.squeeze(barycenter)
points_gs = gs.squeeze(points)
grad_tangent = gs.zeros((len(points),len(barycenter_gs),len(points[0][0])))
for j in range(len(points)):
for i in range(len(barycenter_gs)):
grad_tangent[j][i] = 2*metric.log(points_gs[j][0], barycenter_gs[i] )
grad_tangent = grad_tangent * weights
//cc_barycenter_gs = metric.exp(barycenter_gs,
//lr * grad_tangent.sum(0, keepdims=True))
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: geomstats/geomstats
Commit Name: be291b6a6ab8a663beac72fefa213bc7216a1617
Time: 2020-04-07
Author: hadizaatiti@gmail.com
File Name: geomstats/learning/frechet_mean.py
Class Name:
Method Name: _ball_gradient_descent
Project Name: statsmodels/statsmodels
Commit Name: a7e6b0e70b4416a9e4ace3c1d8a93b996a96a29e
Time: 2020-06-04
Author: samuel.scherrer@posteo.de
File Name: statsmodels/tsa/exponential_smoothing/ets.py
Class Name: ETSModel
Method Name: loglike
Project Name: prody/ProDy
Commit Name: fbb7473de120a00e62688b77192ed47ff922780e
Time: 2012-11-11
Author: lordnapi@gmail.com
File Name: lib/prody/tests/test_proteins/test_sequence.py
Class Name: TestCalcMutualInfo
Method Name: testAmbiguity3
Project Name: prody/ProDy
Commit Name: fbb7473de120a00e62688b77192ed47ff922780e
Time: 2012-11-11
Author: lordnapi@gmail.com
File Name: lib/prody/tests/test_proteins/test_sequence.py
Class Name: TestCalcMutualInfo
Method Name: testAmbiguity6