Given $A \in \mathbb{R}^{n \times n}$, let $Q \in O(n)$ be the orthogonal matrix nearest to $A$ in the Frobenius norm, i.e.,
$$Q := \text{arg}\min_{M \in O(n)} \| A - M \|_{F}^2$$
It's well known that $Q = U V^{T}$, where $A = U\Sigma V^{T}$ is the SVD of $A$ (see Orthogonal_Procrustes, Nearest orthogonal matrix).
I'm trying to solve a similar problem:
$$S := \text{arg}\min_{M \in \mbox{SP}(n)} \| A - M \|_{F}^2$$
where $\mbox{SP}(n)$ is a group of signed permutation matrices.
I know that in the case of permutation matrices, the problem reduces to linear sum assignment and can be solved using the Hungarian algorithm. I suspect in the signed permutation case it will reduce to some linear program. Is it possible to somehow solve this problem using SVD or the Hungarian algorithm?
I would really like to avoid general LP solvers, if possible.