-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
In the blog https://ocramz.github.io/posts/2023-12-21-assignment-riemann-opt.html for the definition of the projection you wrote
α = (I − xx⊤)⊤(z − xz⊤)1
The middle T should be a dagger meaning "left pseudo-inverse" according to the referenced paper [4] https://arxiv.org/abs/1802.02628
In the corresponding code
| alpha, beta = self._lsolve(x, b) |
you seem to be doing some sort of inversion I don't understand but is probably the intended left pseudo inverse.
assignment-riemann-opt/mctorch/manifolds/doublystochastic.py
Lines 162 to 172 in aed67ed
| def _lsolve(self, x, b): | |
| # TODO: A better way to solve it is implemented in `_optimLSolve` | |
| # Once Pytorch gains support for `LinearOperator`/scipy like `cg` | |
| # function, it can be used. | |
| alpha = torch.empty((self._k, self._n)) | |
| beta = torch.empty((self._k, self._m)) | |
| for i in range(self._k): | |
| A = torch.cat((torch.cat((torch.diag(self._p[i]), x[i]), dim=-1), torch.cat((x[i].T, torch.diag(self._q[i])), dim=-1)), dim=0) | |
| zeta = torch.linalg.solve(A, b[i]) | |
| alpha[i], beta[i] = zeta[:self._n], zeta[self._n:] | |
| return alpha, beta |
Doesn't this inversion computational O(n^3) cost per iteration, render the whole exercise pointless (aka complexity >> Munkres ) ?
Metadata
Metadata
Assignees
Labels
No labels