I would like to complete a correlation matrix with missing entries, such that the resulting matrix is positive semi-definite. Say I want to find some x and some y in the next matrix that satisfy positive semi-definiteness:
matrix = {{1, y, 0.8}, {y, 1, x}, {0.8, x, 1}};
I have tried FindInstance, Maximize and FindMaximum. They all give good results.
First a define a function that is used to feed the optimisation functions:
testmatrix[input_, xtest_, ytest_] := input /. {x -> xtest, y -> ytest}
The solutions now are:
sol1 = Maximize[Min[Eigenvalues[testmatrix[matrix, x, y]]], {x, y}]
sol2 = FindInstance[Min[Eigenvalues[testmatrix[matrix, x, y]]] > 0 && 0 < x < 1 && 0 < y < 1, {x, y}, Reals, 1]
sol3 = FindMaximum[Min[Eigenvalues[testmatrix[matrix, x, y]]], {x, y}]
All results give a positive semi-definite correlation matrix:
PositiveDefiniteMatrixQ[testmatrix[matrix, x /. sol1[[2]], y /. sol1[[2]]]]
PositiveDefiniteMatrixQ[testmatrix[matrix, x /. sol2[[2]], y /. sol2[[2]]]]
PositiveDefiniteMatrixQ[testmatrix[matrix, x /. sol3[[1]], y /. sol3[[1]]]]
However, when the size of the matrix and the number of unknowns increase, the calculation time explodes using all methods. Note that I don't require anything else than positive semi-definiteness. I would assume that FindInstance would be the fastest candidate since it does not require an optimal value. Who knows a way to make the procedure more efficient?
Your help is much appreciated.
