维基百科定义的 Java SVD
我正在寻找一个执行奇异值分解的java库,如维基百科中所述:从矩阵A(m X n)得到A = U*S*V',其中U是mxm,S是mxn,V是nx n。
任何人都可以帮助我吗?
请不要回答 colt 或 jama,因为他们对 svd 的定义与维基百科的不同。事实上,colt 返回 A = U*S*V',其中 U 为 mxn,S 为 nxn,V 为 nx n。
或者如何使用 colt 计算维基百科的 svd ?
谢谢
I'm looking for a java library that performs singular value decomposition as descibed in wikipedia: from a matrix A (m X n) get A = U*S*V' where U is m x m, S is m x n and V is n x n.
Anyone can help me ?
Plese don't answer colt or jama because their definition of svd are different from wikipedia's one. In fact colt returns A = U*S*V' where U is m x n, S is n x n and V is n x n.
Alternativley how can I calculate wikipedia's svd using colt ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
奇异分解方法的 JavaDoc 来自 jblas 似乎符合您乍一看所需要的定义,但我认为您必须进行测试才能获得确定性。
另一个是 Universal Java Matrix Package,但是浏览 JavaDoc 相当令人困惑,让我有些担心它的设计(定义 getter 和 setter 的接口?!)
The JavaDoc for singular decomposition methods from jblas seems to adhere to the definition as you require it at first sight, but I think you'd have to test to get any certainty.
Another one is Universal Java Matrix Package, but looking through the JavaDoc is quite bewildering and makes me fear somewhat for its design (interface for defining getters and setters?!)
抱歉回复晚了。但迟到总比不到好。
如果你仔细观察维基百科页面,
它描述了一个 4*5 矩阵,它被分成 au:4*4 ,s:4*5,v=5*5
但如果你仔细观察它, s 矩阵有最后一行和最后一列全是零,因此它实际上只是一个 4*4 矩阵。 (即始终使用较低的维度)
我想这回答了您的问题!
Sorry its a late reply. But it is better late than never.
If u look closely into the wikipedia page ,
it depicts a 4*5 matrix which is split into a u:4*4 ,s:4*5,v=5*5
But if u have close look at it , the s matrix has a last row and a last coloumn full of zeros , hence its effectively a 4*4 matrix only . (ie the lower dimension is only used all the time)
I guess this answers your question !