How to use ehess2rhess

52 views
Skip to first unread message

bouyrie...@gmail.com

unread,
Nov 26, 2014, 4:13:37 AM11/26/14
to manopt...@googlegroups.com

I would like to know which form must have the parameters for ehess2rhess, I tried many things (example on SO(2), otherwise stiefel(2,2) ):

StMan = stiefelfactory(d,d,1);

H = StMan.ehess2rhess([1,1;-1,1], [0,-1;1,0], zeros(2,2,2,2), [0,-1;1,0]);

or

H = StMan.ehess2rhess([1,1;-1,1], [0;-1;1;0], zeros(4,4), [0;-1;1;0]);

or

HH = zeros(4);
H = StMan.ehess2rhess([1,1;-1,1], [0,-1;1,0], @(h) reshape(HH*h(:),2,2), [0,-1;1,0]);

(of course those are just examples but it would help me to see how it works !)

nothing seems to work.
But your toolbox really seems to be a great tool !


Thank you for your time !

Nicolas Boumal

unread,
Nov 26, 2014, 5:26:00 AM11/26/14
to manopt...@googlegroups.com
Hello Mathieu,

Thank you for your interest.

The format for the ehess2rhess function is:

function rhess = ehess2rhess(X, egrad, ehess, H)

The first input is a point on the manifold: X.
The second input is an ambient vector (a matrix of the same size as X, in this case) corresponding to the Euclidean (i.e., the classical) gradient of your cost function at X.
The third input is also an ambient vector, this time corresponding to the Euclidean Hessian of your cost function, at X, along the tangent direction H.
The fourth input is the tangent direction H: a tangent vector at X (for this manifold also a matrix of the same size as X).

The output is a tangent vector at X: the result of applying the Riemannian Hessian of your cost function at X along the tangent direction H.

You need to be attentive to the format in which objects are represented.
For example, for SO(n) (rotationsfactory), the tangent vectors are represented as skew-symmetric matrices (so, H must be skew-symmetric, and the output will be skew-symmetric), but ambient vectors are not: they are just the classical objects (nothing fancy there). For stiefelfactory, there is nothing special of this kind: it does pretty much what you should be expecting (arguably).

I am not sure what you are trying to do with the examples you give, and I am not sure how you determine that it does or does not work.
What is the cost function you are using?

I see you invoke, for ehess, zeros(2,2,2,2) and zeros(4,4) ; are you trying to represent the whole Hessian operator? This is not how Manopt works. Manopt expects you to give the result of applying the Eucldiean Hessian to the vector H. So, ehess is not an operator: it is a vector. Does that make sense? ehess should have the same size as egrad.

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