Class GolubKahanSVD

  • All Implemented Interfaces:
    SVDDecomposition

    public class GolubKahanSVD
    extends Object
    implements SVDDecomposition
    Golub-Kahan algorithm does the SVD decomposition of a tall matrix in two stages.
    1. First, it reduces the matrix to a bidiagonal matrix using a sequence of Householder transformations.
    2. Second, it reduces the super-diagonal of the bidiagonal matrix to 0s, using a sequence of Givens transformations.
    • Constructor Detail

      • GolubKahanSVD

        public GolubKahanSVD​(Matrix A,
                             boolean doUV,
                             boolean normalize,
                             double epsilon)
        Run the Golub-Kahan SVD decomposition on a tall matrix.
        Parameters:
        A - a tall matrix
        doUV - false if to compute only the singular values but not U and V
        normalize - true if to sort the singular values in descending order and make them positive
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
        Throws:
        IllegalArgumentException - if A is not tall
      • GolubKahanSVD

        public GolubKahanSVD​(Matrix A,
                             boolean doUV,
                             boolean normalize,
                             double epsilon,
                             int maxIterations)
        Runs the Golub-Kahan SVD decomposition on a tall matrix.
        Parameters:
        A - a tall matrix
        doUV - false if to compute only the singular values but not U and V
        normalize - true if to sort the singular values in descending order and make them positive
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
        maxIterations - the maximum number of iterations
        Throws:
        IllegalArgumentException - if A is not tall