pymor.algorithms.svd_va¶
Module for SVD method of operators represented by VectorArrays.
Module Contents¶
Functions¶
SVD of a |
|
SVD of a |
- pymor.algorithms.svd_va.method_of_snapshots(A, product=None, modes=None, rtol=1e-07, atol=0.0, l2_err=0.0)[source]¶
SVD of a
VectorArrayusing the method of snapshots.Viewing the
VectorArrayAas aA.dimxlen(A)matrix, the return value of this method is the singular value decomposition ofA, where the inner product on R^(dim(A)) is given byproductand the inner product on R^(len(A)) is the Euclidean inner product.Warning
The left singular vectors may not be numerically orthonormal for ill-conditioned
A.Parameters
- A
The
VectorArrayfor which the SVD is to be computed.- product
Inner product
Operatorw.r.t. which the SVD is computed.- modes
If not
None, at most the firstmodessingular values and vectors are returned.- rtol
Singular values smaller than this value multiplied by the largest singular value are ignored.
- atol
Singular values smaller than this value are ignored.
- l2_err
Do not return more modes than needed to bound the l2-approximation error by this value. I.e. the number of returned modes is at most
argmin_N { sum_{n=N+1}^{infty} s_n^2 <= l2_err^2 }
where
s_ndenotes the n-th singular value.
Returns
- U
VectorArrayof left singular vectors.- s
One-dimensional
NumPy arrayof singular values.- Vh
NumPy arrayof right singular vectors.
- pymor.algorithms.svd_va.qr_svd(A, product=None, modes=None, rtol=4e-08, atol=0.0, l2_err=0.0)[source]¶
SVD of a
VectorArrayusing Gram-Schmidt orthogonalization.Viewing the
VectorArrayAas aA.dimxlen(A)matrix, the return value of this method is the singular value decomposition ofA, where the inner product on R^(dim(A)) is given byproductand the inner product on R^(len(A)) is the Euclidean inner product.Parameters
- A
The
VectorArrayfor which the SVD is to be computed.- product
Inner product
Operatorw.r.t. which the left singular vectors are computed.- modes
If not
None, at most the firstmodessingular values and vectors are returned.- rtol
Singular values smaller than this value multiplied by the largest singular value are ignored.
- atol
Singular values smaller than this value are ignored.
- l2_err
Do not return more modes than needed to bound the l2-approximation error by this value. I.e. the number of returned modes is at most
argmin_N { sum_{n=N+1}^{infty} s_n^2 <= l2_err^2 }
where
s_ndenotes the n-th singular value.
Returns
- U
VectorArrayof left singular vectors.- s
One-dimensional
NumPy arrayof singular values.- Vh
NumPy arrayof right singular vectors.