org.carrot2.matrix.factorization
Class PartialSingularValueDecompositionFactory

java.lang.Object
  extended by org.carrot2.matrix.factorization.PartialSingularValueDecompositionFactory
All Implemented Interfaces:
IMatrixFactorizationFactory

public class PartialSingularValueDecompositionFactory
extends Object
implements IMatrixFactorizationFactory

Factory for PartialSingularValueDecompositions.


Field Summary
protected static int DEFAULT_K
          The default desired number of base vectors
protected  int k
          The desired number of base vectors
 
Constructor Summary
PartialSingularValueDecompositionFactory()
          Creates the factory that creates factorizations that compute the maximum number of base vectors.
 
Method Summary
 IMatrixFactorization factorize(org.apache.mahout.math.matrix.DoubleMatrix2D A)
          Factorizes matrix A.
 int getK()
          Returns the number of base vectors k .
 void setK(int k)
          Sets the number of base vectors k .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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:
Constant Field Values
Constructor Detail

PartialSingularValueDecompositionFactory

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

Method Detail

factorize

public IMatrixFactorization factorize(org.apache.mahout.math.matrix.DoubleMatrix2D A)
Description copied from interface: IMatrixFactorizationFactory
Factorizes matrix A.

Specified by:
factorize in interface IMatrixFactorizationFactory
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 .



Copyright (c) Dawid Weiss, Stanislaw Osinski