Skip to content
Snippets Groups Projects
Commit cf1c1f17 authored by Jake VanderPlas's avatar Jake VanderPlas
Browse files

randomized_range_finder -> randomized_power_iteration

parent 382bea2f
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ For example: ...@@ -72,7 +72,7 @@ For example:
Efficient Linear Algebra & Array Operations Efficient Linear Algebra & Array Operations
=========================================== ===========================================
- :func:`extmath.randomized_range_finder`: construct an orthonormal matrix - :func:`extmath.randomized_power_iteration`: construct an orthonormal matrix
whose range approximates the range of the input. This is used in whose range approximates the range of the input. This is used in
:func:`extmath.fast_svd`, below. :func:`extmath.fast_svd`, below.
......
...@@ -79,7 +79,7 @@ def safe_sparse_dot(a, b, dense_output=False): ...@@ -79,7 +79,7 @@ def safe_sparse_dot(a, b, dense_output=False):
return np.dot(a, b) return np.dot(a, b)
def randomized_range_finder(A, size, n_iterations, random_state=None): def randomized_power_iteration(A, size, n_iterations, random_state=None):
"""Computes an orthonormal matrix whose range approximates the range of A. """Computes an orthonormal matrix whose range approximates the range of A.
Parameters Parameters
...@@ -187,7 +187,7 @@ def fast_svd(M, k, p=None, n_iterations=0, transpose='auto', random_state=0): ...@@ -187,7 +187,7 @@ def fast_svd(M, k, p=None, n_iterations=0, transpose='auto', random_state=0):
# this implementation is a bit faster with smaller shape[1] # this implementation is a bit faster with smaller shape[1]
M = M.T M = M.T
Q = randomized_range_finder(M, k+p, n_iterations, random_state) Q = randomized_power_iteration(M, k+p, n_iterations, random_state)
# project M to the (k + p) dimensional space using the basis vectors # project M to the (k + p) dimensional space using the basis vectors
B = safe_sparse_dot(Q.T, M) B = safe_sparse_dot(Q.T, M)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment