-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
Description
Describe the bug
The PowerMethod algorithm implemented in math/matrix.py is not right, we are using the old norm to divide, and not the norm of the new estimate of the eigen vector.
see here
x_old = self._set_initial_x()
# Iterate until the L2 norm of x converges.
for i_elem in range(max_iter):
xp = get_array_module(x_old)
x_old_norm = xp.linalg.norm(x_old)
x_new = self._operator(x_old) / x_old_norm // <- should be x_new_norm
x_new_norm = xp.linalg.norm(x_new)The Pull Request is on the way.
Reactions are currently unavailable