Click or drag to resize

NNDSVDarGetInitialFactors Method

Creates an NNDSVDar initialization for NMF by applying NNDSVDa and adding small random noise.

Namespace: Altaxo.Calc.LinearAlgebra.Double.Factorization
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public override (Matrix<double> W, Matrix<double> H) GetInitialFactors(
	Matrix<double> X,
	int rank
)

Parameters

X  MatrixDouble
The non-negative input matrix to be factorized.
rank  Int32
The target factorization rank.

Return Value

ValueTupleMatrixDouble, MatrixDouble
A tuple (W0, H0) containing non-negative initial factors with small random perturbations.

Implements

INonnegativeMatrixFactorizationInitializerGetInitialFactors(MatrixDouble, Int32)
Remarks
In the paper Boutsidis and Gallopoulos, 2008, https://doi.org/10.1016/j.patcog.2007.09.010, section 2.3, the zero elements are overwritten with the mean of matrix X * 0.01 * Random. I consider this wrong, because W and H scale with the square root of X, not with X itself. Therefore, for example, if X is scaled with 1E20, W and H are scaled with 1E10, but the zeros would then be replaced with a scale of 1E20 again. Thus, I decided not to use X, but to overwrite the zeros with the average values of W and H * 0.01 * random, respectively. This also avoids peculiarities if the average of X is zero.
See Also