Suppose we define $A^{*}$ of positive definite $A=X'X$ using following two steps:
- let $B=A^{-1}$
- scale columns of $B$ to obtain a matrix with $1$'s on the diagonal
For the case of singular $A$, we could use a tiny amount of Tikhonov regularization: $A^*=\lim_{\epsilon\to 0}(A+\epsilon I)^*$
Is there a name of this operation, or a way to compute it efficiently? Regularized inverse is efficient, but what to use for $\epsilon$?
Replacing regularized inverse with pseudo-inverse in step 1. gives a dramatically different result.
For instance, if we define $A=X'X$ with
$$X=\left( \begin{array}{ccc} 2 & -2 & 2 \\ -1 & 1 & 1 \\ -2 & -2 & 1 \\ 1 & 1 & 3 \\ \end{array} \right)$$
Then $(X'X)^{*}$ seems to be
$$\left( \begin{array}{cccc} 1 & \frac{1}{2} & -\frac{7}{4} & -\frac{7}{8} \\ 2 & 1 & -\frac{7}{2} & -\frac{7}{4} \\ -\frac{4}{7} & -\frac{2}{7} & 1 & \frac{1}{2} \\ -\frac{8}{7} & -\frac{4}{7} & 2 & 1 \\ \end{array} \right)$$
Motivation: empirically this operation seems give a way to obtain least-squares fitted coefficients of an autoregressive model of x, $x\approx Bx$ with diagonal of $B$ restricted to be 0's: $$B=I-(X'X)^*$$
Checks in colab
Edited with answer
The formula for non-singular version
$$B=(X'X)^{-1} (\text{zero_off_diagonal}[(X'X)^{-1}])^{-1}$$
where "zero_off_diagonal" sets all off-diagonal entries to zero.
Formula for singular version
$$P=I-X^\dagger X\\ B=P(\text{zero_off_diagonal}(P))^{-1}$$