使矩阵排名较高? [英] Make a matrix full-ranked?

查看:98
本文介绍了使矩阵排名较高?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将规则矩阵转换为R中排名最高的矩阵?有没有可用的方法?

How can I turn a regular matrix into a matrix full-ranked in R? Is there an available method for that?

我有一个矩阵,该矩阵可能具有线性相关的列,因此我需要 将其传递给一个函数,该函数要求其参数为具有 全职.由于线性相关列不重要 无论如何,我正在寻找一个删除此类列的函数,直到 矩阵是全等级的.当然可能有几种解决方案,但是 他们中的任何一个都应该没事.

I have a matrix that may have linearly dependent columns and I need to pass it to a function that requires its argument to be a matrix with full rank. Since linearly dependent columns are not of interest anyway, I am looking for a function that removes such columns until the matrix is full rank. There may be several solutions of course, but any one of them should be fine.

现在我只是逐列构造矩阵,并且仅 如果结果矩阵仍然是全秩,则添加一列,但是 感觉应该有更好的方法来做到这一点.

Right now I am just constructing the matrix column by column and only add a column if its the resulting matrix is still fullrank, but it feels like there should be a better way to do this.

推荐答案

另一种方法是最小化| y-Ax | 2 + c | x | 2 , 通过将单位矩阵附加到A上,将零附加到y上. 参数c(又名λ) 权衡拟合y-Ax并保持| x |小的. 然后对x的r个最大分量进行第二次拟合, r =等级(A)(或您需要的任何数字).

Another approach is to minimize |y - Ax|2 + c |x|2, by tacking an identity matrix on to A and zeros to y. The parameter c (a.k.a. λ) trades off fitting y - Ax, and keeping |x| small. Then run a second fit with the r largest components of x, r = rank(A) (or any number you please).

这篇关于使矩阵排名较高?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆