How to update cholesky decomposition of the normalized SPD matrix?

조회 수: 12 (최근 30일)
Vlad Gorohov
Vlad Gorohov 2015년 6월 24일
답변: SAI SRUJAN 2024년 9월 25일
I try cholrank1 update ( wikipedia ) of the symmetric positive definite matrix:
function [L] = cholupdate(L,x)
p = length(x);
for k=1:p
r = sqrt(L(k,k)^2 + x(k)^2);
c = r / L(k, k);
s = x(k) / L(k, k);
L(k, k) = r;
L(k+1:p,k) = (L(k+1:p,k) + s*x(k+1:p)) / c;
x(k+1:p) = c*x(k+1:p) - s*L(k+1:p,k);
end
end
Get SPD matrix and factorize it:
H = J'*J
L = chol(H)';
L_updated = cholupdate(L, new_J_row');
It works well. But how can I modify algorithm when I need to do normalization of the SPD matrix?
% normalization
n = 1 ./ sqrt(diag(H));
Hn = diag(n) * H * diag(n);
Ln = chol(Hn)';
Ln_updated = ???

답변 (1개)

SAI SRUJAN
SAI SRUJAN 2024년 9월 25일
Hi Vlad,
Updating the Cholesky decomposition of a normalized symmetric positive definite (SPD) matrix involves a couple of additional steps compared to the standard update. When you normalize an SPD matrix, you are essentially scaling it, which affects both the matrix and its Cholesky factor.
Please go through the following code sample to proceed further,
% normalization
n = 1 ./ sqrt(diag(H));
Hn = diag(n) * H * diag(n);
Ln = chol(Hn)';
% To update with a new row new_J_row, first normalize the new row:
new_J_row_normalized = new_J_row .* n';
Ln_updated = cholupdate(Ln, new_J_row_normalized');
For a comprehensive understanding of the "chol" function in MATLAB, please refer to the following documentation.
I hope this helps!

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by