I came across a question on the checkgradient function. I wonder whether the outcome of the function depends on the manifold since I obtained different outcomes when I apply the same cost function and Euclidean gradient to different manifolds.
For example, when I write my codes as follows:
manifold = complexcirclefactory(10);
problem.M = manifold;
problem.cost = @(x) x'*W*x;
problem.egrad = @(x) 2*W*x;
checkgradient(problem);
where W is a 10 by 10 symmetric matrix, the checkgradient function tells me I am correct. However, when I do it with
manifold = elliptopefactory(10,1);
the outcome will be totally different. I would appreciate it if you could tell me why on this. Thank you very much.
Alex
Thank you for your reply. I understand your explanation for my question. As you said, I am exactly handling a problem whose variable is a vector, and each entry is either +1 or -1. So does it mean elliptopefactory cannot handle it, or I can use the real Oblique manifold?
Thank you.
Alex