Calculation of Schur complement returns matrix which is not positive semidefinite
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to implement some basic Gaussian process regression. I know Matlab has functions that do this but I want to do a bit by hand so I feel more comfortable with the methods.
I'm using the following code to calculate the Schur complement to generate a covariance matrix for the data conditioned on the observations yObserv.
A = K(1:end-nObserv,1:end-nObserv);
B = K(1:end-nObserv,end-(nObserv-1):end);
C = K(end-(nObserv-1):end,end-(nObserv-1):end);
KSchur = A - B*(C\B');
mu = B*(C\(yObserv'));
Unfortunately, in some cases this expression returns a matrix which is not positive semidefinite, apparently due to numerical factors. The alternate strategy:
KSchur = A - B*inv(C)*B';
Has the same problem. I'm not experienced with such issues, so I'm hoping someone can suggest a way to formulate this operation to avoid the problem. Any suggestions?
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Computations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!