(empirical) relation between MSE and condition number

In summary, the conversation is about testing the correlation between the mean squared error (MSE) for coefficients and the condition number in an inverse linear problem. The speaker is using MATLAB code to draw random matrices, add noise, and calculate coefficients from Least Squares. They are expecting a correlation between the MSE and condition number, but are getting arbitrary and uncorrelated results. They are seeking advice on potential errors or assumptions in their approach.
  • #1
divB
87
0
Hi,

It is a well known fact that in an inverse linear problem low condition numbers have low noise amplification and therefore decrease the error.

So I wanted to test this: I draw random (skinny) matrices A, calculate y=A*c where c is a known coefficient vector, add some noise and calculate c from Least Squares. I would expect at least a small correlation between the MSE for c and the condition number.

But this is what it looks:

untitled.png


Yes, is it arbitrary, uncorrelated, this does not make sense at all! For example, a (relatively) low condition number of 1.5 can produce everything from the best (-79dB) down to the worst (-56dB). Changing the parameters does not change anything

Can anyone tell me what I am doing wrong or which (wrong?) assumptions I make?

Thanks


PS: Here is the MATLAB code

Code:
K = 5;
M = 50;
numtrials = 1000;
c = randn(K,1);
for trial=1:numtrials
    A = randn(M,K);
    y = A*c;
    y = add_noise(y, 55); % add 55dB noise via randn(...)
    c_rec = A \ y; %c_rec = pinv(A)*y;
    NMSE_c = 20*log10(norm(c - c_rec)/norm(c));
    plot(cond(A), NMSE_c, 'bo');
    hold on;
    xlabel('Condition number');
    ylabel('NMSE of coefficients');
    drawnow;
end
 
Physics news on Phys.org
  • #2
Well, this is not my field but I will try to give you some advices. What's happen if you add a 0db noise ? Also, are you sure that the function add_noise is bug free ?
 

Related to (empirical) relation between MSE and condition number

1. What is the empirical relation between MSE and condition number?

The empirical relation between MSE (Mean Squared Error) and condition number is that as the condition number increases, the MSE also increases. This means that as the matrix becomes more ill-conditioned, the accuracy of the solution decreases.

2. How does the condition number affect the accuracy of a solution?

The condition number is a measure of how sensitive a matrix is to changes in its inputs. A higher condition number means that small changes in the inputs can result in large changes in the output. As a result, a higher condition number can lead to a less accurate solution.

3. Is there a mathematical equation that relates MSE and condition number?

Yes, there is an equation that relates MSE and condition number. It is given by: MSE = condition number * (norm of error)^2, where the norm of error is the difference between the actual solution and the approximate solution.

4. Can the condition number be used as a measure of matrix accuracy?

No, the condition number alone cannot be used as a measure of matrix accuracy. It is important to also consider other factors such as the type of matrix, the size of the matrix, and the method used to solve it.

5. How can the condition number be improved to increase the accuracy of a solution?

The condition number can be improved by using matrix conditioning techniques, such as scaling, pivoting, and reordering. These techniques can help reduce the sensitivity of the matrix and improve the accuracy of the solution.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
941
  • General Math
Replies
9
Views
2K
Replies
12
Views
3K
  • Special and General Relativity
3
Replies
75
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
2K
  • General Math
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Replies
1
Views
2K
Back
Top