MatrixFreeRandomizedLinearAlgebra.jl is a Julia package that provides
efficient implementations of randomized algorithms for linear algebra tasks,
such as matrix approximations and singular value decompositions. The package is
designed to work with large-scale matrices in a matrix-free manner, meaning that
it does not require explicit storage of the entire matrix.
You can install MatrixFreeRandomizedLinearAlgebra.jl using Julia's package
manager:
] add MatrixFreeRandomizedLinearAlgebraBelow is a simple example of how to use MatrixFreeRandomizedLinearAlgebra.jl
to compute a randomized SVD of a matrix:
using MatrixFreeRandomizedLinearAlgebra
A = randn(100, 50) # Some matrix we want to approximate
target_rank = 10
U, S, Vt = rsvd(A, target_rank) # Compute the randomized SVD
rel_norm = opnorm(A - U * Diagonal(S) * Vt) / opnorm(A) # Compute relative error
println("Relative error of the approximation: ", rel_norm)