After the initialization routine
e04raf has been called,
e04rff may be used to define the objective function of the problem as a quadratic function
or a sparse linear function
unless the objective function has already been defined by another routine in the suite. This objective function will typically be used for linear programming (LP)
quadratic programming problems (QP)
or for semidefinite programming problems with bilinear matrix inequalities (BMI-SDP)
The matrix
is a sparse symmetric
by
matrix. It does not need to be positive definite. See
e04raf for more details.
None.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Not applicable.
None.
This example demonstrates how to use nonlinear semidefinite programming to find a nearest correlation matrix satisfying additional requirements. This is a viable alternative to routines
g02aaf,
g02abf,
g02ajf or
g02anf as it easily allows you to add further constraints on the correlation matrix. In this case a problem with a linear matrix inequality and a quadratic objective function is formulated to find the nearest correlation matrix in the Frobenius norm preserving the nonzero pattern of the original input matrix. However, additional box bounds (
e04rhf) or linear constraints (
e04rjf) can be readily added to further bind individual elements of the new correlation matrix or new matrix inequalities (
e04rnf) to restrict its eigenvalues.
The problem is as follows (to simplify the notation only the upper triangular parts are shown). To a given
by
symmetric input matrix
find correction terms
which form symmetric matrix
so that the following requirements are met:
(a) |
It is a correlation matrix, i.e., symmetric positive semidefinite matrix with a unit diagonal. This is achieved by the way is assembled and by a linear matrix inequality
|
(b) |
is nearest to in the Frobenius norm, i.e., it minimizes the Frobenius norm of the difference which is equivalent to:
|
(c) |
preserves the nonzero structure of . This is met by defining only for nonzero elements . |
See also
Section 10 in
e04raf for links to further examples in the suite.