# Status: Inaccurate/Solved And linsysolve: Schur complement matrix not positive definite

Hi! There is a problem in my simulation when using cvx. My purpose is to estimate the matrix S and the sign of BS is equal to Z. But the S calculated by cvx results in BS ==H, i.e, B*S-H == 0. It is not subject to my aim. And I has also tried to change the solvers to sedumi or mosek. However, It doesn’t work.
The following is the problem model:

And the matlab code is showd as
indent preformatted text by 4 spaces

    % Lasso quesiton in MMV model
function [X,idx] = Cvx_CS_Th_M(Z,B,K,H)
[~,N] = size(B);
L = size(Z,2);
cvx_begin
variable S(N,L) complex
minimize sum(norms(S,2,2))
subject to
real(B*S-H).*real(Z)>=0;
imag(B*S-H).*imag(Z)>=0;
cvx_end
row_norm = sum(abs(X).^2,2);
[~,idx_vec]=sort(row_norm,'descend');
idx = idx_vec(1:K);
end

Calling SDPT3 4.0: 3456 variables, 432 equality constraints


num. of constraints = 432
dim. of socp var = 3024, num. of socp blk = 432
dim. of linear var = 432

SDPT3: Infeasible path-following algorithms

## number of iterations = 24 primal objective value = 3.00000035e+00 dual objective value = 3.00000000e+00 gap := trace(XZ) = 5.10e-07 relative gap = 7.29e-08 actual relative gap = 4.98e-08 rel. primal infeas (scaled problem) = 8.26e-08 rel. dual " " " = 8.42e-12 rel. primal infeas (unscaled problem) = 0.00e+00 rel. dual " " " = 0.00e+00 norm(X), norm(y), norm(Z) = 2.4e+00, 1.6e+00, 2.5e+01 norm(A), norm(b), norm© = 4.3e+02, 1.4e+01, 2.2e+01 Total CPU time (secs) = 4.38 CPU time per iteration = 0.18 termination code = -5 DIMACS: 4.0e-07 0.0e+00 9.2e-11 0.0e+00 5.0e-08 7.3e-08

Status: Inaccurate/Solved
Optimal value (cvx_optval): +3

Sorry I can’t understand your question. Show your mosek output if convenient, so that the experts might read something useful from it. And maybe your data for reproducing.

Your formulation is incorrect for your aim. B*S = H satisfies the constraints in your CvX program. if that is not an acceptable solution, then you need to change to a different problem formulation. I don’t understand the notation in the image and have no idea what the formulation in the image is doing, but your CVX formulation is different.

If you want to have signs be the same, but not allow either of the signs to be “zero”, then you need to bound those items away from zero with some tolerance, such as ... >= 1e-5, rather than … >= 0.

I‘m sorry to give the vague description. In my problem, \tilde{{Z}} = \tilde{\Psi}S+N-H_R and N is unknown noise. What we knew are \tilde{\Psi}, H_{R} and the sign information of \tilde{Z}.

S is a row-sparse matrix and there are only a few non-zeros row in S. The indices of non-zeros row is desired.

The mosek output is showed as

Calling Mosek 9.1.9: 3456 variables, 432 equality constraints
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (6) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (7) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (8) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (9) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (10) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (11) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (12) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (13) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (14) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (15) of matrix 'A'.
Warning number 710 is disabled.
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 432
Cones                  : 432
Scalar variables       : 3456
Matrix variables       : 0
Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 0.00
Lin. dep.  - number                 : 0
Presolve terminated. Time: 0.05
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 432
Cones                  : 432
Scalar variables       : 3456
Matrix variables       : 0
Integer variables      : 0

Optimizer  - threads                : 16
Optimizer  - solved problem         : the primal
Optimizer  - Constraints            : 432
Optimizer  - Cones                  : 432
Optimizer  - Scalar variables       : 3456              conic                  : 3024
Optimizer  - Semi-definite variables: 0                 scalarized             : 0
Factor     - setup time             : 0.03              dense det. time        : 0.00
Factor     - ML order time          : 0.02              GP order time          : 0.00
Factor     - nonzeros before factor : 9.35e+04          after factor           : 9.35e+04
Factor     - dense dim.             : 0                 flops                  : 1.57e+08
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   2.0e+00  0.0e+00  4.3e+02  0.00e+00   4.320000000e+02   0.000000000e+00   1.0e+00  0.14
1   3.1e-01  1.8e-15  2.2e+01  9.98e-01   6.251088838e+01   1.314913653e+00   1.6e-01  0.33
2   4.5e-02  2.7e-15  8.0e-01  1.21e+00   9.515053810e+00   2.814138004e+00   2.3e-02  0.36
3   2.0e-02  6.2e-15  2.4e-01  1.33e+00   5.587222931e+00   2.948885516e+00   1.0e-02  0.38
4   4.8e-03  3.0e-14  2.8e-02  1.19e+00   3.562384140e+00   2.991447327e+00   2.4e-03  0.41
5   5.2e-05  2.7e-14  3.1e-05  1.05e+00   3.005988603e+00   2.999940562e+00   2.6e-05  0.44
6   1.0e-07  7.6e-13  2.8e-09  1.00e+00   3.000012033e+00   2.999999880e+00   5.3e-08  0.45
7   7.4e-12  9.6e-12  2.0e-13  1.00e+00   3.000000001e+00   3.000000000e+00   3.8e-12  0.48
Optimizer terminated. Time: 0.53

Interior-point solution summary
Problem status  : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal.  obj: 3.0000000009e+00    nrm: 2e+00    Viol.  con: 4e-12    var: 9e-13    cones: 4e-16
Dual.    obj: 3.0000000000e+00    nrm: 1e+00    Viol.  con: 0e+00    var: 5e-12    cones: 0e+00
Optimizer summary
Optimizer                 -                        time: 0.53
Interior-point          - iterations : 7         time: 0.48
Basis identification  -                        time: 0.00
Primal              - iterations : 0         time: 0.00
Dual                - iterations : 0         time: 0.00
Clean primal        - iterations : 0         time: 0.00
Clean dual          - iterations : 0         time: 0.00
Simplex                 -                        time: 0.00
Primal simplex        - iterations : 0         time: 0.00
Dual simplex          - iterations : 0         time: 0.00
Mixed integer           - relaxations: 0         time: 0.00

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +3


Thanks for your advice. I will try it soon.

I have tried to change the constraint as >=1e-5 and it didn’t work. And I also adjust the 1e-5 to 1e-4, 1e-3 and the result has little changes. But I found that when H_R becomes zero or is deleted, the true S is optimized rather than B*S=H

The MOSEK log output looks exemplary. The only thing that could be suspicious are those warnings about tiny inputs. If the elements of Z are almost zero then talking about their sign is meaningless. Maybe that is the issue.

Thanks for your comment. Do your word means the warnings indicate the elements of input data \tilde{Z} are nearly zero? In my matlab code, Z= \textrm{sign}(\tilde{Z}) when \tilde{Z} is truth data whose elements are varies from -7 to 7 generally.

maybe there are elements of magnitude 11e-6, 1e-7, e-8,. 1e-9, 1e-10, or smaller. Perhaps given the range of -7 to 7, these very small magnitude numbers should be exactly zero, and are not zero, only due to roundoff in how they were generated?

Thanks for your explanation. Indeed, the truth data \tilde{Z} is related to a variable whose value is generated randomly. The range (-7, 7) is the statistical result from 100 repeated trials and the minimum amplitude of element is more than 1e-2 in each trial.
En… can I have a more question? According to your reply, Is the matrix A in the warning
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (6) of matrix 'A'." `
the matrix Z in my matlab code?

I think the matrix A might be the matrix that CVX puts into MOSEK, which it is hard to know exactly, because CVX needs to pre-process your data (modeling) before putting them into MOSEK.

Okay, I get it! Thank you, Jack.