Closed letaylor closed 8 years ago
Thanks Leland,
You are right. We are going to add something.
Cheers, Christoph
On Tue, Feb 10, 2015 at 8:49 AM, Leland Taylor notifications@github.com wrote:
It might be helpful for users if LIMIX raised a warning when/if the user provides a "covariance matrix" that is not semi-definite positive.
Currently if this happens in test_lmm, the user just gets an array of NAs.
import scipy as sp import scipy.linalg as la import warnings
read in / generate covariance_matrix
eigenvals, eigenvecs = la.eigh(covariance_matrix) min_eigenval = eigenvals.min() if min_eigenval < 0: warnings.warn('The covariance is not semi-definite positive (min eigenv=%.2e<0)'%min_eigenval)
— Reply to this email directly or view it on GitHub https://github.com/PMBio/limix/issues/10.
Thanks Christoph!
I suppose this has been solved.
It might be helpful for users if LIMIX raised a warning when/if the user provides a "covariance matrix" that is not semi-definite positive.
Currently if this happens in test_lmm, the user just gets an array of NAs.