[NumPy-Tickets] [NumPy] #1223: numpy.random.multivariate_normal accepts indefinite covariance matrices

NumPy Trac numpy-tickets@scipy....
Tue Jun 29 19:41:23 CDT 2010


#1223: numpy.random.multivariate_normal accepts indefinite covariance matrices
-------------------------------------------------------+--------------------
 Reporter:  zero79                                     |       Owner:  somebody
     Type:  defect                                     |      Status:  new     
 Priority:  normal                                     |   Milestone:          
Component:  numpy.random                               |     Version:          
 Keywords:  multivariate normal covariance indefinite  |  
-------------------------------------------------------+--------------------

Comment(by dgoldsmith):

 Thanks, josef.  Based on that discussion, might I suggest a hierarchical
 approach: first, Cholesky is tried to take the matrix square-root -
 according to CH in the above thread, IIUC, this will automatically provide
 the function w/ a check on the "physicality" of `cov`.  If Cholesky works,
 great, we're done; if it throws an exception, to satisfy RK, an
 independent check on `cov` is performed (what would be the speediest way
 to independently assess `cov` for both symmetry and PSDness?).  If `cov`
 passes that test, eigh (as suggested by CH) is tried; if it succeeds, the
 result is returned, along w/ a message that Cholesky failed, `cov` _might_
 be asymmetric and/or not PSD; if eigh also fails, give up: return
 np.empty() and a message that `cov` is _likely_ asymmetric and/or not PSD.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1223#comment:6>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list