gpt4 book ai didi

python - 计算对称矩阵的前 k 个(绝对值)特征值

转载 作者:行者123 更新时间:2023-12-04 09:11:58 27 4
gpt4 key购买 nike

假设我有一个对称矩阵 M,它不是正(半)定的,我想计算它的 k 顶(绝对值)特征值(和相应的特征向量)。现在,可以使用截断的 SVD 来做到这一点,它将返回所述特征值的绝对值,然后必须检查符号并找到相应的特征向量(两者都是 。这实现起来有点麻烦,所以一个想知道这是否藏在某个图书馆的某个地方。 tensorflow 版本会特别有趣。

最佳答案

Lanczos 算法听起来很适合您的问题。这是 Wikipedia 中对 Lanczos 的描述页:

The Lanczos algorithm is a direct algorithm devised by Cornelius Lanczos that is an adaptation of power methods to find the m "most useful" (tending towards extreme highest/lowest) eigenvalues and eigenvectors of an n times n Hermitian matrix, where m is often but not necessarily much smaller than n.


Python 中的示例库: https://github.com/topics/lanczos

关于python - 计算对称矩阵的前 k 个(绝对值)特征值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63333551/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com