limited the amount of data copying when passing between methods
added regularization term to logDet(M) for numerical stability. The small (1e-10) negative eigenvalues of the separate matrices would accumulate into the final additive M due to round off error. Thus, det(M)<0 and the log would blow up, returning nan.
logDet(M)
for numerical stability. The small (1e-10
) negative eigenvalues of the separate matrices would accumulate into the final additiveM
due to round off error. Thus,det(M)<0
and thelog
would blow up, returningnan
.lMax==-1
after searching.