Frage

How to get non-trivial solution for such equation with Numpy?

r1 = r1 * 0.03  + r2 * 0.88 + r3 * 0.2425 + r4 * 0.03 + r5 * 0.03
r2 = r1 * 0.455 + r2 * 0.03 + r3 * 0.2425 + r4 * 0.03 + r5 * 0.88
r3 = r1 * 0.455 + r2 * 0.03 + r3 * 0.03   + r4 * 0.03 + r5 * 0.03
r4 = r1 * 0.03  + r2 * 0.03 + r3 * 0.2425 + r4 * 0.03 + r5 * 0.03
r5 = r1 * 0.03  + r2 * 0.03 + r3 * 0.2425 + r4 * 0.88 + r5 * 0.03
War es hilfreich?

Lösung

If you're just looking for a library function that does this, just use numpy.linalg.eig and look for the eigenvector with eigenvalue equal to 1. If you need to implement an iterative solver, probably the power method is the best idea for this. It should simply work because the vector with eigenvalue of 1 is also the one with largest eigenvalue. Krylov subspace method (Rayleigh iteration) should work well on this too.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top