Manifolds to a tangent space

45 views
Skip to first unread message

HAO FANG

unread,
Sep 5, 2022, 1:31:02 PM9/5/22
to Manopt
Hi everyone, 

I have some positive definite matrices (m*m* N, N is the total number of the data), which stands for the features of my data. Now, I am going to mapping all the PSD matrices to the tangent space of its Riemannian mean (R_M = riemannian_mean(m*m* N)). Does manopt provide any codes help me realize this mapping so that after mapping, I can get vectorized data (say M*N) ?

Sincerely,

Ronny Bergmann

unread,
Sep 8, 2022, 7:37:13 AM9/8/22
to Manopt
Hi,
The Matlab variant is not my main area of expertise, but the SPD manifold
you could use on any of your N matrices,
in there you have a log. so something like

```
M = sympositivedefinitefactory(m)
M.log(mean, pi) % or data[:,:,i]
```

for all your N pi matrices could work.
collecting all these in a mxmxN array you could reshape it afterwards.

Hope this is a first start,
Ronny

Nicolas Boumal

unread,
Sep 15, 2022, 4:59:58 AM9/15/22
to Manopt
Hello,

As Ronny pointed out, the affine invariant geometry of positive definite matrices is implemented in Manopt as sympositivedefinitefactory.

There is a built-in example in /manopt/examples/ that computes the intrinsic mean of positive definite matrices -- the code is optimized for clarity rather than efficiency, but it should still be decent:
(I just now changed the name to positive_definite_intrinsic_mean; it used to be positive_definite_karcher_mean: unless you pull the latest Manopt code, you will see the former name on your computer.)

Thus, you could run the intrinsic mean computation to get a reference point X; get a structure M from sympositivedefinitefactory; then use M.log(X, Y) to map each data point Y to the tangent space at X.

Feel free to let us know if you run into trouble.

Best,
Nicolas
Reply all
Reply to author
Forward
0 new messages