Class RegularizedCholeskyDecomposition
java.lang.Object
org.hipparchus.optim.nonlinear.vector.constrained.RegularizedCholeskyDecomposition
Calculates a Cholesky decomposition with adaptive diagonal regularization.
Given a symmetric matrix A, this class attempts to compute a lower
triangular matrix L such that:
A + shift * I = L L^T
where shift >= 0 is chosen automatically when needed to enforce
strict positive definiteness.
The decomposition is therefore performed on the regularized matrix, which can
be retrieved using getRegularizedMatrix().
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault threshold below which diagonal pivots are considered too small.static final doubleDefault growth factor for the diagonal shift.static final intDefault maximum number of regularization attempts.static final doubleDefault threshold above which off-diagonal elements are considered too different and the matrix is not symmetric. -
Constructor Summary
ConstructorsConstructorDescriptionBuild the decomposition using default thresholds.RegularizedCholeskyDecomposition(RealMatrix matrix, double relativeSymmetryThreshold, double absolutePositivityThreshold) Build the decomposition using custom symmetry and positivity thresholds.RegularizedCholeskyDecomposition(RealMatrix matrix, double relativeSymmetryThreshold, double absolutePositivityThreshold, double diagonalGrowthFactor, int maxRegularizationSteps) Build the decomposition using fully custom settings. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturn the determinant of the regularized matrix.doubleGet the final diagonal shift added to the original matrix.getL()Returns the matrix L of the decomposition.getLT()Returns the transpose of the matrix L of the decomposition.Get the regularized matrix actually factorized.Get a solver for finding the solution of the regularized system.
-
Field Details
-
DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
public static final double DEFAULT_RELATIVE_SYMMETRY_THRESHOLDDefault threshold above which off-diagonal elements are considered too different and the matrix is not symmetric.- See Also:
-
DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD
public static final double DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLDDefault threshold below which diagonal pivots are considered too small.- See Also:
-
DEFAULT_DIAGONAL_GROWTH_FACTOR
public static final double DEFAULT_DIAGONAL_GROWTH_FACTORDefault growth factor for the diagonal shift.- See Also:
-
DEFAULT_MAX_REGULARIZATION_STEPS
public static final int DEFAULT_MAX_REGULARIZATION_STEPSDefault maximum number of regularization attempts.- See Also:
-
-
Constructor Details
-
RegularizedCholeskyDecomposition
Build the decomposition using default thresholds.- Parameters:
matrix- matrix to decompose
-
RegularizedCholeskyDecomposition
public RegularizedCholeskyDecomposition(RealMatrix matrix, double relativeSymmetryThreshold, double absolutePositivityThreshold) Build the decomposition using custom symmetry and positivity thresholds.- Parameters:
matrix- matrix to decomposerelativeSymmetryThreshold- symmetry thresholdabsolutePositivityThreshold- positivity threshold
-
RegularizedCholeskyDecomposition
public RegularizedCholeskyDecomposition(RealMatrix matrix, double relativeSymmetryThreshold, double absolutePositivityThreshold, double diagonalGrowthFactor, int maxRegularizationSteps) Build the decomposition using fully custom settings.- Parameters:
matrix- matrix to decomposerelativeSymmetryThreshold- symmetry thresholdabsolutePositivityThreshold- positivity thresholddiagonalGrowthFactor- growth factor applied to the diagonal shiftmaxRegularizationSteps- maximum number of regularization attempts
-
-
Method Details
-
getDiagonalShift
public double getDiagonalShift()Get the final diagonal shift added to the original matrix.- Returns:
- diagonal shift
-
getRegularizedMatrix
Get the regularized matrix actually factorized.- Returns:
- regularized matrix
-
getL
Returns the matrix L of the decomposition.L is a lower-triangular matrix.
- Returns:
- the L matrix
-
getLT
Returns the transpose of the matrix L of the decomposition.LT is an upper-triangular matrix.
- Returns:
- the transpose of the matrix L
-
getDeterminant
public double getDeterminant()Return the determinant of the regularized matrix.- Returns:
- determinant of the regularized matrix
-
getSolver
Get a solver for finding the solution of the regularized system.- Returns:
- a solver
-