MATLAB codes for restoring definiteness of a symmetric matrix by shrinking
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
license.txt
readme.md
shrink_bisect.m
shrink_bisect_fb.m
shrink_gep.m
shrink_gep_fb.m
shrink_newton.m
test_matrix.m
test_shrink.m
test_shrink_timings.m

readme.md

shrinking - MATLAB Codes for Restoring Definiteness via Shrinking

About

shrinking is a collection of MATLAB functions for repairing invalid (indefinite) covariance and correlation matrices, based on the paper

N. J. Higham, N. Strabić, and V. Šego, "Restoring Definiteness via Shrinking, with an Application to Correlation Matrices with a Fixed Block", SIAM Review, 58(2):245--263, 2016.

The main functions are

  • shrink_bisection: a bisection algorithm,

  • shrink_bisection_fb: a bisection algorithm optimized for a block 2-by-2 matrix with a positive definite (1,1) block A and a block-diagonal target matrix with diagonal blocks A and the identity.

  • shrink_newton: a Newton algorithm.

  • shrink_gep: a generalized eigenvalue-based algorithm.

  • shrink_gep_fb: a generalized eigenvalue-based algorithm optimized for the same fixed block case as shrink_bisection_fb.

Other M-files:

  • test_shrink: tests the above functions on a single test problem and plots the function of the underlying optimization problem.

  • test_shrink_timings: runs timing tests on the shrinking codes as well as the NAG code g02aa/nag_nearest_correlation for computing the nearest correlation matrix.

  • test_matrix.m: used by the previous two M-files to generate a test matrix.

Requirements

The functions shrink_newton, shrink_gep and shrink_gep_fb require the NAG Toolbox for MATLAB.

The codes have been developed under MATLAB 2014a and 2014b.

License

See license.txt for licensing information.

DOI

10.5281/zenodo.23027