1313# compute_rqb uses "RQB".
1414SVD = namedtuple ("SVD" , ["U" , "s" , "V" ])
1515TLSQ = namedtuple ("TLSQ" , ["X_denoised" , "Y_denoised" ])
16- RQB = namedtuple ("RQB" , ["Q" , "B" , "Omega " ])
16+ RQB = namedtuple ("RQB" , ["Q" , "B" , "test_matrix " ])
1717
1818
1919def _svht (sigma_svd : np .ndarray , rows : int , cols : int ) -> int :
@@ -196,10 +196,10 @@ def compute_rqb(
196196 svd_rank : Number ,
197197 oversampling : int ,
198198 power_iters : int ,
199- Omega : np .ndarray = None ,
199+ test_matrix : np .ndarray = None ,
200200 seed : int = None ,
201201) -> NamedTuple (
202- "RQB" , [("Q" , np .ndarray ), ("B" , np .ndarray ), ("Omega " , np .ndarray )]
202+ "RQB" , [("Q" , np .ndarray ), ("B" , np .ndarray ), ("test_matrix " , np .ndarray )]
203203):
204204 """
205205 Randomized QB Decomposition.
@@ -222,18 +222,18 @@ def compute_rqb(
222222 the Randomized QB Decomposition. Note that as many as 1 to 2 power
223223 iterations often lead to considerable improvements.
224224 :type power_iters: int
225- :param Omega : The random test matrix that will be used when executing
225+ :param test_matrix : The random test matrix that will be used when executing
226226 the Randomized QB Decomposition. If not provided, the `svd_rank` and
227227 `oversampling` parameters will be used to compute the random matrix.
228- :type Omega : numpy.ndarray
228+ :type test_matrix : numpy.ndarray
229229 :param seed: Seed used to initialize the random generator when computing
230230 random test matrices.
231231 :type seed: int
232232 :return: the orthonormal basis matrix, the transformed data matrix, and
233233 the random test matrix.
234234 :rtype: NamedTuple("RQB", [('Q', np.ndarray),
235235 ('B', np.ndarray),
236- ('Omega ', np.ndarray)])
236+ ('test_matrix ', np.ndarray)])
237237
238238 References:
239239 N. Benjamin Erichson, Lionel Mathelin, J. Nathan Kutz, Steven L. Brunton.
@@ -244,14 +244,14 @@ def compute_rqb(
244244 raise ValueError ("Please ensure that input data is a 2D array." )
245245
246246 # Define the random test matrix if not provided.
247- if Omega is None :
247+ if test_matrix is None :
248248 m = X .shape [- 1 ]
249249 r = compute_rank (X , svd_rank )
250250 rng = np .random .default_rng (seed )
251- Omega = rng .standard_normal ((m , r + oversampling ))
251+ test_matrix = rng .standard_normal ((m , r + oversampling ))
252252
253253 # Compute sampling matrix.
254- Y = X .dot (Omega )
254+ Y = X .dot (test_matrix )
255255
256256 # Perform power iterations.
257257 for _ in range (power_iters ):
@@ -265,7 +265,7 @@ def compute_rqb(
265265 # Project the snapshot matrix onto the smaller space.
266266 B = Q .conj ().T .dot (X )
267267
268- return RQB (Q , B , Omega )
268+ return RQB (Q , B , test_matrix )
269269
270270
271271def pseudo_hankel_matrix (X : np .ndarray , d : int ) -> np .ndarray :
0 commit comments