这是使用 Matlab 的一种方法:
- Let x denote the (row) left† eigenvector associated to eigenvalue 1. It satisfies the system of linear equations (or matrix equation) xA = x, or x(A−I)=0.
- 为了避免该方程组的全零解,请删除第一个方程并任意设置x其余方程中为 1。
- Solve those remaining equations (with x1 = 1) to obtain the other entries of x.
使用 Matlab 的示例:
>> A = [.6 .1 .3
.2 .7 .1
.5 .1 .4]; %// example stochastic matrix
>> x = [1, -A(1, 2:end)/(A(2:end, 2:end)-eye(size(A,1)-1))]
x =
1.000000000000000 0.529411764705882 0.588235294117647
>> x*A %// check
ans =
1.000000000000000 0.529411764705882 0.588235294117647
注意代码-A(1, 2:end)/(A(2:end, 2:end)-eye(size(A,1)-1))
是步骤3。
In your formulation you define x to be a (column) right eigenvector of AT (such that ATx = x). This is just x.'
from the above code:
>> x = x.'
x =
1.000000000000000
0.529411764705882
0.588235294117647
>> A.'*x %// check
ans =
1.000000000000000
0.529411764705882
0.588235294117647
你当然可以正常化特征向量为和 1:
>> x = x/sum(x)
x =
0.472222222222222
0.250000000000000
0.277777777777778
>> A.'*x %'// check
ans =
0.472222222222222
0.250000000000000
0.277777777777778
† Following the usual convention http://en.wikipedia.org/wiki/Stochastic_matrix. Equivalently, this corresponds to a right eigenvector of the transposed matrix.