Skip to main content
. 2025 Jan 30;11:e2579. doi: 10.7717/peerj-cs.2579

Algorithm 1 . Procedure to obtain a low-rank approximation of the data matrix X.

1: procedure LowRankApproximation ( X, ξ)
2:    Returns the dimension of the data matrix X
3:     n,d DIMENSION (X) n: #row, d: #feature
4:    Utilizing either Truncated SVD or Randomized SVD
5:     U,S,V SVD(∗) (X) n see “SVD with Row Reduction (SVD-RR) & Randomized SVD”
6:    Computes the rank of matrix X using eigenvalues
7:     r RANK (S,ξ) n see “Determining the Rank”
8:    The low-rank components of the matrices are extracted
9:     U^U[:,1:r]
10:    S^S[1:r,1:r]
11:    V^V[1:r,1:r]
12:   return n,d,r,U^,S^,V^
13: end procedure