Registered Member
|
To solve a quadratic programming problem, I need to provide a matrix Q, that is positive semidefinite.
I compute this matrix using Eigen as Q=AA' with A a real m x n matrix with n >> m However in frequent situations the optimizer tells me, that Q is not positive semidefinite. I performed two tests, for the failure cases: 1. I computed the Cholesky decomposition in Eigen for Q, which fails due to a "Numerical Issue" 2. I computed the Eigen Decomposition of Q. The Eigenvalues are indeed slightly negative I am particularly interested, why this can happen? E.g. how I could modify A, such that I can circumvent this numerical issue? One additional thing I already tried, and which seems to work, is that in my Eigen decomposition I set every eigenvalue less than 0.001 to 0.001 and reassemble the Q matrix. However, I guess there are more efficient or elegant ways of doing this? Thanks for your help! |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]