31d8076c8dd31c28054e820571ef38234950e101,geomstats/spd_matrices_space.py,,group_log,#Any#,76
Before Change
[eigenvalues, vectors] = np.linalg.eigh(sym_mat)
assert np.all(eigenvalues > 0)
diag_log = np.zeros((n_sym_mats, mat_dim, mat_dim))
for i in range(n_sym_mats):
diag_log[i] = np.diag(np.log(eigenvalues[i]))
log = np.matmul(diag_log, np.transpose(vectors, axes=(0, 2, 1)))
log = np.matmul(vectors, log)
return log
After Change
log_eigenvalues = np.log(eigenvalues)
aux = np.einsum("ijk,ik->ijk", vectors, log_eigenvalues)
log_mat = np.einsum("ijk,ilk->ijl", aux, vectors)
log_mat = vectorization.to_ndarray(log_mat, to_ndim=3)
return log_mat
class SPDMatricesSpace(EmbeddedManifold):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: geomstats/geomstats
Commit Name: 31d8076c8dd31c28054e820571ef38234950e101
Time: 2018-05-08
Author: ninamio78@gmail.com
File Name: geomstats/spd_matrices_space.py
Class Name:
Method Name: group_log
Project Name: geomstats/geomstats
Commit Name: ca7b264f69db393e3d1c704a20b4f22047d1998f
Time: 2018-05-08
Author: ninamio78@gmail.com
File Name: geomstats/spd_matrices_space.py
Class Name:
Method Name: group_exp
Project Name: geomstats/geomstats
Commit Name: 3c082fc0821ff9f9b1284a486a5cf60f9aec238e
Time: 2018-11-07
Author: null
File Name: examples/loss_and_gradient_se3.py
Class Name:
Method Name: grad