public class NonNegativeMatrixFactorizationOPL extends Object implements MatrixFactorization
R Zdunek and A. Cichocki, (2008), "Fast Nonnegative Matrix Factorization Algorithms Using Projected Gradient Approaches for Lage-Scale Problems," Intell. Neuroscience, vol. 2008, here
NOTE: Does not work yet. Returns 0 matrices.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ITERATIONS
By default, use this many iterations.
|
static String |
ITERATIONS
The System Property used to define the number of gradient iterations used
when decomposing a matrix.
|
static String |
PROPERTY_PREFIX
The base property prefix.
|
Constructor and Description |
---|
NonNegativeMatrixFactorizationOPL()
Instantiates a new
NonNegativeMatrixFactorizationOPL that uses
the system default Properties to determnine the number of
iterations to use when decomposing matrices. |
NonNegativeMatrixFactorizationOPL(int numIterations)
Instantiates a new
NonNegativeMatrixFactorizationOPL instance
which will use numIterations to compute the decomposed matrices. |
NonNegativeMatrixFactorizationOPL(Properties props)
Instantiates a new
NonNegativeMatrixFactorizationOPL that uses
the provided Properties to determnine the number of iterations to
use when decomposing matrices. |
Modifier and Type | Method and Description |
---|---|
Matrix |
classFeatures()
Returns the latent class by feature
Matrix . |
Matrix |
dataClasses()
Returns the data point by latent class
Matrix . |
void |
factorize(MatrixFile mFile,
int numDimensions)
Factorizes the
MatrixFile m . |
void |
factorize(SparseMatrix m,
int numDimensions)
Factorizes the
SparseMatrix m . |
MatrixBuilder |
getBuilder()
Returns a
MatrixBuilder that is optimized for MatrixFile s
that will be processed by this MatrixFactorization algorithm. |
static void |
initialize(Matrix m)
Initializes every value in
m to be a random value between 0 and
1, inclusive. |
static void |
makeNonZero(Matrix m)
Sets any negative values of
m to zero. |
public static final String PROPERTY_PREFIX
public static final String ITERATIONS
public static final String DEFAULT_ITERATIONS
public NonNegativeMatrixFactorizationOPL()
NonNegativeMatrixFactorizationOPL
that uses
the system default Properties
to determnine the number of
iterations to use when decomposing matrices.public NonNegativeMatrixFactorizationOPL(Properties props)
NonNegativeMatrixFactorizationOPL
that uses
the provided Properties
to determnine the number of iterations to
use when decomposing matrices.public NonNegativeMatrixFactorizationOPL(int numIterations)
NonNegativeMatrixFactorizationOPL
instance
which will use numIterations
to compute the decomposed matrices.public void factorize(MatrixFile mFile, int numDimensions)
MatrixFile
m
. If m
is of size
MxN, this will generate two matrices: one of size MxnumDimensions
and one of size numDimensions
xN. This method must be called
before calling dataClasses
and classFeatures
.factorize
in interface MatrixFactorization
public void factorize(SparseMatrix m, int numDimensions)
SparseMatrix
m
. If m
is of size
MxN, this will generate two matrices: one of size MxnumDimensions
and one of size numDimensions
xN. This method must be called
before calling dataClasses
and classFeatures
.factorize
in interface MatrixFactorization
public Matrix dataClasses()
Matrix
. This matrix
represents the degree by which each data point can be explained by the
discovered latent classes. Actual interpretations of the latent classes
depends on the actual algorithm used. This Matrix
can be used as
a reduced representation of the data points themselves.dataClasses
in interface MatrixFactorization
public Matrix classFeatures()
Matrix
. This matrix
represents the degree by which each feature affects each latent class.
Actual interpretations of this interaction depends on the actual
algorithm used. This Matrix
can be used as a reduced
representation of the features.classFeatures
in interface MatrixFactorization
public MatrixBuilder getBuilder()
MatrixBuilder
that is optimized for MatrixFile
s
that will be processed by this MatrixFactorization
algorithm.getBuilder
in interface MatrixFactorization
public static void makeNonZero(Matrix m)
m
to zero.public static void initialize(Matrix m)
m
to be a random value between 0 and
1, inclusive.Copyright © 2012. All Rights Reserved.