Maximizing f(x) = x'Ax makes sense only when A is negative-definite.
Therefore, this is the same as minimizing x'Bx, where B = -A, and B is
positive-definite.
In other words, you should be able to simply flip the sign of the original
matrix . This should yield a positive-definite matrix sinc
Sorry, that should've been sum(diag(D)) or max(eigen(D)$values) in stead of
max(diag(D)).
Tsjerk
On Jan 3, 2012 4:52 PM, "Tsjerk Wassenaar" wrote:
Hi Riccardo,
Would it be possible to use max(diag(D))*diag(ncol(D)) - D ? That also
reverses the order of eigenvalues/-vectors.
Cheers,
Tsjerk
>
Hi Riccardo,
Would it be possible to use max(diag(D))*diag(ncol(D)) - D ? That also
reverses the order of eigenvalues/-vectors.
Cheers,
Tsjerk
On Jan 2, 2012 4:35 PM, "riccardo24" wrote:
Hi, I need to maximize a quadratic function under constraints in R.
For minimization I used solve.QP but f
I don't have experience with this in R and I'm not sure I understand the
question that well but maybe something like nearPD()?
Ken Hutchison
On Jan 2, 2012, at 6:36 AM, riccardo24 wrote:
> Hi, I need to maximize a quadratic function under constraints in R.
> For minimization I used solve.QP
Hi, I need to maximize a quadratic function under constraints in R.
For minimization I used solve.QP but for maximization it is not useful since
the matrix D of the quadratic function
should be positive definite hence I cannot simply change the sign.
any suggestion ?
thanks
--
View this message i
5 matches
Mail list logo