Class PartialSingularValueDecompositionFactory

java.lang.Object
org.carrot2.attrs.AttrComposite
org.carrot2.math.matrix.PartialSingularValueDecompositionFactory
All Implemented Interfaces:
AcceptingVisitor, MatrixFactorizationFactory

public class PartialSingularValueDecompositionFactory extends AttrComposite implements MatrixFactorizationFactory
Performs matrix factorization using the Singular Value Decomposition algorithm.
  • Field Details

    • k

      protected int k
      The desired number of base vectors
    • DEFAULT_K

      protected static final int DEFAULT_K
      The default desired number of base vectors
      See Also:
  • Constructor Details

    • PartialSingularValueDecompositionFactory

      public PartialSingularValueDecompositionFactory()
      Creates the factory that creates factorizations that compute the maximum number of base vectors.
  • Method Details

    • factorize

      public MatrixFactorization factorize(org.carrot2.math.mahout.matrix.DoubleMatrix2D A)
      Description copied from interface: MatrixFactorizationFactory
      Factorizes matrix A.
      Specified by:
      factorize in interface MatrixFactorizationFactory
      Parameters:
      A - matrix to be factorized.
    • setK

      public void setK(int k)
      Sets the number of base vectors k .
      Parameters:
      k - the number of base vectors
    • getK

      public int getK()
      Returns the number of base vectors k .