改善条件恶劣的矩阵 [英] Improving a badly conditioned matrix
问题描述
我有一个条件恶劣的矩阵,其 rcond()
是接近于零,因此,该矩阵的逆并不正确.我尝试使用 pinv()
,但这不能解决问题.这就是我采取的相反方法:
I have a badly conditioned matrix, whose rcond()
is close to zero, and therefore, the inverse of that matrix does not come out to be correct. I have tried using pinv()
but that does not solve the problem. This is how I am taking the inverse:
X = (A)\(b);
我正在寻找针对此问题的解决方案,并找到了此链接(最后一种解决方案)以改善矩阵.那里的解决方案建议使用此方法:
I looked up for a solution to this problem and found this link (last solution) for improving the matrix. The solution there suggests to use this:
A_new = A_old + c*eye(size(A_old));
c > 0
所在的位置.到目前为止,采用该技术可以使矩阵A
的条件更好,并且所得的结果看起来更好.但是,我使用了不同的c
值进行了调查,得出的结果取决于所选c
的值.
Where c > 0
. So far employing this technique works in making the matrix A
better conditioned and the resultant solution looks better. However, I investigated using different values of c
and the resultant solution depends on the value of chosen c
.
除了手动调查c
的值外,还有没有一种自动的方法可以找到最佳解决方案的c
值?
Other than manually investigating for the value of c
, is there an automatic way through which I can find the value of c
for which I get the best solution?
推荐答案
在离散逆理论中,将一个较小的值c
添加到要反转的矩阵A
的对角线上,这称为阻尼反转,而要添加的小值c
被称为Marquardt-Levenberg系数.有时矩阵A的特征值为零或接近零,因此矩阵变得奇异.向对角线元素添加较小的阻尼系数使其稳定.
c
的值越大,阻尼的值越大,您的矩阵求反更加稳定,但您离真正的解决方案还很远.
c
的值较小,阻尼的值较小,您的倒排矩阵与真正的倒排矩阵更接近,但可能会变得不稳定.
有时使用的一种自适应阻尼"技术是-从测试值c
开始,对矩阵A
求逆,然后减小c的值,再次进行求反,依此类推.当A
再次变为奇数时,当您在倒数矩阵中获得怪异的值时停止,例如真正的大数字.
我认为这不能完全回答您的问题,但是将其放入评论中太久了.
In discrete inverse theory, adding a small value c
to the diagonal of the matrix A
about to be inverted, is called damping the inversion and the small value to be added c
is called Marquardt-Levenberg coefficient. Sometimes matrix A has zero or close to zero eigenvalues, due to which the matrix becomes singular; adding a small damping coefficient to the diagonal elements makes it stable.
Bigger is the value of c
, bigger is the damping, your matrix inversion is more stable, but you are further away from true solution.
Smaller is the value of c
, smaller is the damping, closer is your inverted matrix to true inverted matrix but it might become unstable.
One 'adaptive damping' technique sometimes used is - start with a test value of c
, invert the matrix A
, then decrease the value of c, do the inversion again and so on. stop when you get weird values in inverted matrix due to A
becoming singular again, like really large numbers.
I think this doesn't exactly answer your question, but it was too long to put it in a comment.
这篇关于改善条件恶劣的矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!