[SciPy-user] How to generate random positive definite matrix
Tue Jun 12 03:45:32 CDT 2007
On 12/06/07, David Cournapeau <firstname.lastname@example.org> wrote:
> I also have mine for quite some time now for my toolbox for EM. Mine is
> a bit more complicated, because I handle the diagonal case separately. I
> didn't know about this test (I intend to use something like
> Dvoretzky-Kiefer-Wolfowitz tests and apply it to the whole scipy.stats
> package, but that will take time).
This test is not chosen in any kind of careful way, I was just looking
for a way to check the covariance matrices output by my code against
the random values they were supposed to be describing. Of course, I
needed to be able to test the statistical test itself, so I wrote a
multivariate normal generator - in too much of a hurry to make it
match the usual random number generator API (and hey! generators are
cool). This, of course, needed to be tested... you get the picture.
Do you mean testing the scipy.stats distributions to make sure that
they generate the same distribution as the cdf describes? In fact most
of them are already tested this way using scipy's kstest module.
(Unless I'm mistaken the kstest module doesn't work right for
discrete-valued distributions, so they are not correctly tested. The
kstest module itself doesn't appear to be tested either...)
More information about the SciPy-user