[Numpy-discussion] Ticket #1223...
Bruce Southey
bsouthey@gmail....
Tue Jun 29 22:16:30 CDT 2010
On Tue, Jun 29, 2010 at 6:03 PM, David Goldsmith
<d.l.goldsmith@gmail.com> wrote:
> On Tue, Jun 29, 2010 at 3:56 PM, <josef.pktd@gmail.com> wrote:
>>
>> On Tue, Jun 29, 2010 at 6:37 PM, David Goldsmith
>> <d.l.goldsmith@gmail.com> wrote:
>> > ...concerns the behavior of numpy.random.multivariate_normal; if that's
>> > of
>> > interest to you, I urge you to take a look at the comments (esp. mine
>> > :-) );
>> > otherwise, please ignore the noise. Thanks!
>>
>> You should add the link to the ticket, so it's faster for everyone to
>> check what you are talking about.
>>
>> Josef
>
> Ooops! Yes I should; here it is:
>
> http://projects.scipy.org/numpy/ticket/1223
> Sorry, and thanks, Josef.
>
> DG
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
As I recall, there is no requirement for the variance/covariance of
the normal distribution to be positive definite.
>From http://en.wikipedia.org/wiki/Multivariate_normal_distribution
"The covariance matrix is allowed to be singular (in which case the
corresponding distribution has no density)."
So you must be able to draw random numbers from such a distribution.
Obviously what those numbers really mean is another matter (I presume
the dependent variables should be a linear function of the independent
variables) but the user *must* know since they entered it. Since the
function works the docstring Notes comment must be wrong.
Imposing any restriction means that this is no longer a multivariate
normal random number generator. If anything, you can only raise a
warning about possible non-positive definiteness but even that will
vary depending how it is measured and on the precision being used.
Bruce
More information about the NumPy-Discussion
mailing list