Class RegularizedCholeskyDecomposition

java.lang.Object
org.hipparchus.optim.nonlinear.vector.constrained.RegularizedCholeskyDecomposition

public class RegularizedCholeskyDecomposition extends Object
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 Details

    • DEFAULT_RELATIVE_SYMMETRY_THRESHOLD

      public static final double DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
      Default 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_THRESHOLD
      Default threshold below which diagonal pivots are considered too small.
      See Also:
    • DEFAULT_DIAGONAL_GROWTH_FACTOR

      public static final double DEFAULT_DIAGONAL_GROWTH_FACTOR
      Default growth factor for the diagonal shift.
      See Also:
    • DEFAULT_MAX_REGULARIZATION_STEPS

      public static final int DEFAULT_MAX_REGULARIZATION_STEPS
      Default maximum number of regularization attempts.
      See Also:
  • Constructor Details

    • RegularizedCholeskyDecomposition

      public RegularizedCholeskyDecomposition(RealMatrix matrix)
      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 decompose
      relativeSymmetryThreshold - symmetry threshold
      absolutePositivityThreshold - 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 decompose
      relativeSymmetryThreshold - symmetry threshold
      absolutePositivityThreshold - positivity threshold
      diagonalGrowthFactor - growth factor applied to the diagonal shift
      maxRegularizationSteps - 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

      public RealMatrix getRegularizedMatrix()
      Get the regularized matrix actually factorized.
      Returns:
      regularized matrix
    • getL

      public RealMatrix getL()
      Returns the matrix L of the decomposition.

      L is a lower-triangular matrix.

      Returns:
      the L matrix
    • getLT

      public RealMatrix 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

      public DecompositionSolver getSolver()
      Get a solver for finding the solution of the regularized system.
      Returns:
      a solver