Click or drag to resize

RegularizationAddRegularization Method

Adds regularization coefficients to a matrix representing a linear equation system matrix*parameters == 0 in order to enforce smoothness on the solution parameters.

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static void AddRegularization(
	this IMatrix<double> matrix,
	IVector<double>? parameter,
	int numberOfRegularRows,
	double lambda,
	int numberOfPoints,
	int derivativeOrder,
	int polynomialOrder,
	bool isCircular
)

Parameters

matrix  IMatrixDouble
The matrix of the linear equation system matrix*parameter==0, which should be solved in the least squares sense. The RowCount of the matrix has to be numberOfRegularRows + matrix.ColumnCount.
parameter  IVectorDouble
The parameter vector of the linear equation system. If not null, this vector will be filled with zeros for the regularization terms. The length of the vector has to be numberOfRegularRows + matrix.ColumnCount.
numberOfRegularRows  Int32
The number of regular rows of the matrix, i.e. the number rows of the linear equation system. The matrix must have more rows to adapt the regularization coefficients, namely numberOfRegularRows + matrix.ColumnCount.
lambda  Double
The regularization parameter lambda. The higher this parameter is, the smoother the parameters.
numberOfPoints  Int32
The number of points. Must be 1 (regularization order 0), 2 (regularization order 1), or an odd number.
derivativeOrder  Int32
The derivative order, usually, this is set to 2. This parameter is ignored if numberOfPoints is 1 or 2.
polynomialOrder  Int32
The polynomial order, usually this is set to 2. This parameter is ignored if numberOfPoints is 1 or 2.
isCircular  Boolean
Usually, this parameter is false. If set to true, the regularization parameters will be set circular, which means that there is also some smoothness enforced between the last parameter and the first parameter.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMatrixDouble. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentExceptionMatrix does not have enough rows to add regularization terms. - matrix
ArgumentOutOfRangeExceptionnumberOfPoints - Number of points for regularization must be 1, 2, or an odd integer.
See Also