Skylark (Sketching Library)
0.1
|
#include <RandSVD.hpp>
Public Member Functions | |
template<typename InputMatrixType , typename UMatrixType , typename SingularValuesMatrixType , typename VMatrixType > | |
void | operator() (InputMatrixType &A, int target_rank, UMatrixType &U, SingularValuesMatrixType &SV, VMatrixType &V, rand_svd_params_t params, skylark::base::context_t &context) |
Definition at line 36 of file RandSVD.hpp.
void skylark::nla::randsvd_t< SketchTransform >::operator() | ( | InputMatrixType & | A, |
int | target_rank, | ||
UMatrixType & | U, | ||
SingularValuesMatrixType & | SV, | ||
VMatrixType & | V, | ||
rand_svd_params_t | params, | ||
skylark::base::context_t & | context | ||
) | [inline] |
Sanity checks, raise an exception if: i) the target rank is too large for the given input matrix or ii) the number of columns of the sketched matrix either:
Apply sketch transformation on the input matrix
The three steps of the sketched svd approach follow:
Q = QR(Q)
q steps of subspace iteration
Q = QR(A^T * Q)
SVD of projected A and then project-back left singular vectors
Definition at line 42 of file RandSVD.hpp.
References skylark::sketch::c::CWT, skylark::sketch::c::FJLT, skylark::base::Gemm(), skylark::sketch::c::JLT, min(), skylark::nla::rand_svd_params_t::num_iterations, skylark::nla::rand_svd_params_t::oversampling, skylark::nla::rand_svd_params_t::skip_qr, SKYLARK_THROW_EXCEPTION, and skylark::nla::rand_svd_params_t::transform.