You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Hi,
Any idea how to trick Manopt and work with positive definite diagonal matrices without using the factory for (full) pd matrices?
Thanks,
Nickolay
BM
unread,
Dec 3, 2017, 1:46:45 PM12/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to manopt...@googlegroups.com
Hello Nickolay,
One quick solution: a structure of, say n, elements with sympositivedefinitefactory(1) entries.
M = sympositivedefinitefactory(1). mymanifold = powermanifold(M,n); % This creates a cell structure
While optimization, instead of diagonal matrices, try to convert all operations to vector operations, by making use of cell2mat.
Regards, Bamdev
nickolay.t...@open.ac.uk
unread,
Dec 3, 2017, 3:04:14 PM12/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Thanks for the suggestion. However, my optimisation domain is already a product of three manifolds, one of which is the positive diagonals.
It seems, I cannot define correctly the structures.
Nickolay
BM
unread,
Dec 3, 2017, 7:59:35 PM12/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Hello Nickolay,
I managed to put a factory for matrices with element-wise positive entries (this trivially covers your case of positive vectors) in place. Attached is the factory + its test file.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Dear Bamdev,
Many thanks for the effort. The idea was to make it without further resources.
Anyway, it's better to explain what I had in mind initially. To keep the diagonal entries of D away from 0, my idea was to compute the gradient with respect to D making use of a "variable" inner product <.,.>_D^-1 = trace[(.)D^-1(.)']. Then the original gradients simply gets multiplied by D.
Well, but Manopt detects that this is a wrong gradient, based on the given cost function. So, the problem is in fact how to tell Manopt that different inner product is used to calculate the gradient?
With best regards,
Nickolay
BM
unread,
Dec 4, 2017, 12:06:47 PM12/4/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Hello Nickolay,
The factory is very much like the positive definite manifold, now restricted to scalars (a matrix of them). All the operations are pretty similar.
Anyway, it's better to explain what I had in mind initially. To keep the diagonal entries of D away from 0, my idea was to compute the gradient with respect to D making use of a "variable" inner product <.,.>_D^-1 = trace[(.)D^-1(.)']. Then the original gradients simply gets multiplied by D.
Interesting. How do you ensure positivity of D?
Well, but Manopt detects that this is a wrong gradient, based on the given cost function. So, the problem is in fact how to tell Manopt that different inner product is used to calculate the gradient?
Would it be possible to share a snippet of the code? This will allow us to resolve the issue.
Regards,
Bamdev
nickolay.t...@open.ac.uk
unread,
Dec 4, 2017, 2:33:30 PM12/4/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Yes, the positive factory is fine. But sorry, I mislead you. In fact, I need a D with non-zero entries. It is then used in the problem as D^2, so it becomes positive. Of course, the problem can be re-stated for D^2 and then, your positive factory will work. However, I prefer working with D, as it suits what is already written.
What I said about the inner products concerns keeping D with non-zero entries. So, it looks like I need to modify somehow euclideanfactory to work with "variable" inner product. Or this is impossible?
BM
unread,
Dec 4, 2017, 6:03:16 PM12/4/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
What I said about the inner products concerns keeping D with non-zero entries. So, it looks like I need to modify somehow euclideanfactory to work with "variable" inner product. Or this is impossible?
I don't think it is directly possible to modify the metric (defined in inside a factory) dynamically while running a Manopt algorithm.
Best,
nickolay.t...@open.ac.uk
unread,
Dec 5, 2017, 9:25:14 AM12/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Then, the options to either work with D^2 and rely on your new positive factory, or create a "non-zero" euclidean factory to work with the current gradients.
I've been using this trick with variable metric when transforming the optimisation into dynamical system and solving ODEs.
BM
unread,
Dec 5, 2017, 1:44:34 PM12/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
For working with the positive factory, we need to work with D and not D^2.
nickolay.t...@open.ac.uk
unread,
Dec 5, 2017, 2:22:29 PM12/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Well, yes could be used, but it looks like overkill as the restriction on D is to be non-zero.
nickolay.t...@open.ac.uk
unread,
Dec 5, 2017, 2:37:20 PM12/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
OK, I replaced the euclideanfactory with positivefactory for the particular unknown, and the results are wrong:
The slope should be 2. It appears to be: 1.
If it is far from 2, then directional derivatives might be erroneous.
Obviously, needs more attention.
On Tuesday, 5 December 2017 18:44:34 UTC, BM wrote:
BM
unread,
Dec 5, 2017, 4:58:14 PM12/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Thanks.
We should check whether the euclidean gradient wrt D is correctly provided.
Best, Bamdev
Nicolas Boumal
unread,
Dec 5, 2017, 5:26:47 PM12/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Hello Nickolay,
The set R\{0} is disconnected, so whatever you do optimizing over it will be problematic (you need to pick the sign, and optimization on manifolds as available in Manopt (or anywhere else as far as I know) won't be able to jump from one connected component to the other. If you have n such signs to choose, then there are 2^n possible choices, and it becomes a combinatoric nightmare.
Perhaps the sign is actually irrelevant, and you actually do only care about the absolute value? In which case working with D^2 should be fine.
Best,
Nicolas
nickolay.t...@open.ac.uk
unread,
Dec 6, 2017, 9:35:52 AM12/6/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
Yes, I agree with everything you say. The problem is that the original unknown is D, not D^2. In this particular situation, D^2 can probably be used, and forget about D.
I'll think about this later on.
Thanks,
Nickolay
nickolay.t...@open.ac.uk
unread,
Dec 8, 2017, 8:49:50 AM12/8/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Manopt
It doesn't work well with D^2 either.
Indeed, it's better to send you the codes. How can I make attachment here in the forum?