This is for use in a nonlinear optimization routine. If I have a Hessian (or Hessian approximation) $H$, that is not guaranteed to be positive semi-definite (PSD), I'd like to find a regularization parameter $\mu$ such that the matrix $\tilde H = H + \mu I$ is positive (semi)definite, but that leaves $\mu$ relatively small. Are there any cheap ways of choosing $\mu$ to do this?
My current solution is to choose $\mu = 10^{-6}$ then check PSD-ness by attempting a Cholesky decomposition and increasing $\mu$ by a factor of $10$ until the Cholesky decomposition succeeds. But this seems inefficient. Are there any best practices for setting the regularization parameter $\mu$ in these situations?
Assuming that Hessian matrix $\rm H$ is symmetric, we have the following semidefinite program (SDP)
$$\begin{array}{ll} \underset{t \geq 0}{\text{minimize}} & t\\ \text{subject to} & \mathrm H + t \, \mathrm I \succeq \mathrm O\end{array}$$
The minimum is attained at $t_{\min} := -\lambda_{\min}(\mathrm H)$.
matrices symmetric-matrices positive-definite linear-matrix-inequality semidefinite-programming