Click or drag to resize

FastNonnegativeLeastSquaresExecution(IROMatrixDouble, IROMatrixDouble, NullableDouble, IMatrixDouble, IMatrixDouble) Method

Execution of the fast nonnegative least squares algorithm. The algorithm finds a vector x with all elements xi>=0 which minimizes |X*x-y|.

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static void Execution(
	IROMatrix<double> XtX,
	IROMatrix<double> Xty,
	double? tolerance,
	out IMatrix<double> x,
	out IMatrix<double> w
)

Parameters

XtX  IROMatrixDouble
X transposed multiplied by X, thus a square matrix.
Xty  IROMatrixDouble
X transposed multiplied by Y, thus a matrix with one column and same number of rows as X.
tolerance  NullableDouble
Used to decide if a solution element is less than or equal to zero. If this is null, a default tolerance of tolerance = MAX(SIZE(XtX)) * NORM(XtX,1) * EPS is used.
x  IMatrixDouble
Output: solution vector (matrix with one column and number of rows according to dimension of X.
w  IMatrixDouble
Output: Lagrange vector. Elements which take place in the fit are set to 0. Elements fixed to zero contain a negative number.
Remarks

Literature: Rasmus Bro and Sijmen De Jong, 'A fast non-negativity-constrained least squares algorithm', Journal of Chemometrics, Vol. 11, 393-401 (1997)

Algorithm modified by Dirk Lellinger 2015 to allow a mixture of restricted and unrestricted parameters.

See Also