commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becksfort, Jared" <Jared.Becksf...@STJUDE.ORG>
Subject RE: [math] Unit Tests for Multivariate Distribution Sampling
Date Wed, 25 Jul 2012 14:00:44 GMT
I have another question, this time about the API.  The covariance matrix of a multivariate
normal distribution is called sigma in a number of R libraries, but I am not sure it is called
that everywhere.  I named the parameters and get methods for the covariance matrix things
like "getSigma" but mentioned covariance matrix in the comments.  Do the developers here have
a preference between getSigma and getCovarianceMatrix?  I can change the parameters accordingly.


-----Original Message-----
From: Becksfort, Jared
Sent: Tuesday, July 24, 2012 11:29 PM
To: Commons Developers List
Subject: [math] Unit Tests for Multivariate Distribution Sampling


I am working on submitting code for multivariate normal distributions, including sampling
and unit tests (issue Math-815).  It is my first submission, and it has had some issues with
style and other guidelines.  Gilles has given me some useful feedback about several pieces,
but I thought I would also ask a question this list.

I need to have a unit test pass deterministically even though the sampling algorithm is inherently
stochastic.  I assumed that resetting the seed before sampling would be sufficient to test
a few values to within a specified tolerance.  It has worked so far for me.  Gilles suggested,
though, that I use the testSampling method in as a model.
 But it uses a statistical test (Chi-Squared) in addition to resetting the seed.  Aside from
the added difficulty of hypothesis testing in more dimensions, is it actually necessary? 
Wouldn't resetting the seed give you the same values each time when you sample in the unit
test?  Doesn't that make it essentially a deterministic test, eliminating the need for a hypothesis
test of the samples?


Email Disclaimer:
Consultation Disclaimer:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message