C# Class Accord.Math.Decompositions.NonnegativeFactorization

Nonnegative Matrix Factorization.

For a nonnegative n-by-m matrix A, the Nonnegative Matrix Factorization is given by a n-by-k matrix of nonnegative factors W and a k-by-m matrix of nonnegative factor coefficients H. The factorization is not exact, as W * H is a lower-rank approximation to A. The factors W and H are chosen to minimize the root-mean-squared residual U between A and W * H.

References: http://en.wikipedia.org/wiki/Non-negative_matrix_factorization http://www.mathworks.com/help/toolbox/stats/nnmf.html

Datei anzeigen Open project: atosorigin/Kinect

Public Methods

Method Description
NonnegativeFactorization ( double value ) : System

Constructs a new non-negative matrix factorization.

NonnegativeFactorization ( double value, double h0, double w0 ) : System

Constructs a new non-negative matrix factorization.

NonnegativeFactorization ( double value, double h0, double w0, NonnegativeFactorizationAlgorithm algorithm ) : System

Constructs a new non-negative matrix factorization.

NonnegativeFactorization ( double value, double h0, double w0, NonnegativeFactorizationAlgorithm algorithm, int attempts, int maxIterations, double errorTolerance, double changeTolerance ) : System

Constructs a new non-negative matrix factorization.

NonnegativeFactorization ( double value, int k ) : System

Constructs a new non-negative matrix factorization.

NonnegativeFactorization ( double value, int k, NonnegativeFactorizationAlgorithm algorithm ) : System

Constructs a new non-negative matrix factorization.

NonnegativeFactorization ( double value, int k, NonnegativeFactorizationAlgorithm algorithm, int attempts, int maxIterations, double errorTolerance, double changeTolerance ) : System

Constructs a new non-negative matrix factorization.

NonnegativeFactorization ( double value, int k, int attempts ) : System

Constructs a new non-negative matrix factorization.

Private Methods

Method Description
init ( double value, int k, NonnegativeFactorizationAlgorithm algorithm, double h0, double w0, int attempts, int maxIterations, double errorTolerance, double changeTolerance ) : void

Constructs a new non-negative matrix factorization.

makepositive ( double value ) : void

Enforces a matrix to contain only positive values.

maxabs ( double value ) : double

Max absolute value

maxdiff ( double matrixA, double matrixB ) : double

Max absolute difference

nnmf ( double value, double &w0, double &h0, NonnegativeFactorizationAlgorithm alg, int maxIterations, double normChangeThreshold, double maxFactorChangeThreshold ) : double

Single non-negative matrix factorization.

normdiff ( double matrixA, double matrixB ) : double

Norm of differences

Method Details

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value ) : System
value double The matrix to be factorized.
return System

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value, double h0, double w0 ) : System
value double The matrix to be factorized.
h0 double Initial approximation to the coefficient matrix H. /// Default is .
w0 double Initial approximation to the weight matrix W. /// Default is .
return System

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value, double h0, double w0, NonnegativeFactorizationAlgorithm algorithm ) : System
value double The matrix to be factorized.
h0 double Initial approximation to the coefficient matrix H.
w0 double Initial approximation to the weight matrix W.
algorithm NonnegativeFactorizationAlgorithm The algorithm to be used in the factorization. /// Please see for details. /// Default is .
return System

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value, double h0, double w0, NonnegativeFactorizationAlgorithm algorithm, int attempts, int maxIterations, double errorTolerance, double changeTolerance ) : System
value double The matrix to be factorized.
h0 double Initial approximation to the coefficient matrix H.
w0 double Initial approximation to the weight matrix W.
algorithm NonnegativeFactorizationAlgorithm The algorithm to be used in the factorization. /// Please see for details. /// Default is .
attempts int How many repetitions of the method should be /// performed to avoid arriving at a poor local solution minima. Default /// value is 1.
maxIterations int The maximum number of iterations to perform.
errorTolerance double The minimum change in error to use as convergence criteria.
changeTolerance double The maximum absolute factor change to use as convergence criteria.
return System

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value, int k ) : System
value double The matrix to be factorized.
k int The desired approximation rank.
return System

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value, int k, NonnegativeFactorizationAlgorithm algorithm ) : System
value double The matrix to be factorized.
k int The desired approximation rank.
algorithm NonnegativeFactorizationAlgorithm The algorithm to be used in the factorization. /// Please see for details. /// Default is .
return System

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value, int k, NonnegativeFactorizationAlgorithm algorithm, int attempts, int maxIterations, double errorTolerance, double changeTolerance ) : System
value double The matrix to be factorized.
k int The desired approximation rank.
algorithm NonnegativeFactorizationAlgorithm The algorithm to be used in the factorization. /// Please see for details. /// Default is .
attempts int How many repetitions of the method should be /// performed to avoid arriving at a poor local solution minima. Default /// value is 1.
maxIterations int The maximum number of iterations to perform.
errorTolerance double The minimum change in error to use as convergence criteria.
changeTolerance double The maximum absolute factor change to use as convergence criteria.
return System

NonnegativeFactorization() public method

Constructs a new non-negative matrix factorization.
public NonnegativeFactorization ( double value, int k, int attempts ) : System
value double The matrix to be factorized.
k int The desired approximation rank.
attempts int How many repetitions of the method should be /// performed to avoid arriving at a poor local solution minima. Default /// value is 1.
return System