
I would like to expose an interface for random matrix generation on scipy, in particular, SO(N) and O(N) functionality. I wrote some code to generate random correlation matrices that could also be exposed. These seem like basic multi-dimensional results that would be useful in a wide variety of situations. There is a "random_rot" function generating SO(N) matrices in scipy/linalg/tests/test_decomp. It has a bug that was since fixed in the MDP package from whence it came, but was never fixed in scipy. A variation of this will generate O(N) matrices, and a little more work yields random correlation matrices. In Oct 2008 when random_rot was added, it was suggested that linalg was a good place for these functions. Is that still the case? Or should they be somewhere in scipy.random? Do we need a new place for random matrices? I have not contributed to scipy before. Let me know what the steps are and I will do my best to take care of this. This could benefit a wide variety of users, and it would be good to have widely used code. Thanks, Philip

On Wed, Oct 28, 2015 at 12:12 PM, Philip DeBoer <philip.deboer@gmail.com> wrote:
I would like to expose an interface for random matrix generation on
scipy, in particular, SO(N) and O(N) functionality. I wrote some code to generate random correlation matrices that could also be exposed. These seem like basic multi-dimensional results that would be useful in a wide variety of situations.
There is a "random_rot" function generating SO(N) matrices in
scipy/linalg/tests/test_decomp. It has a bug that was since fixed in the MDP package from whence it came, but was never fixed in scipy. A variation of this will generate O(N) matrices, and a little more work yields random correlation matrices.
In Oct 2008 when random_rot was added, it was suggested that linalg was a
good place for these functions. Is that still the case? Or should they be somewhere in scipy.random? Do we need a new place for random matrices?
I have not contributed to scipy before. Let me know what the steps are
and I will do my best to take care of this. This could benefit a wide variety of users, and it would be good to have widely used code. We have started to add multivariate distributions to scipy.stats, so I might recommend that location, even if you just have the random generation functions and not the PDFs (though these are often just constants in these cases). https://github.com/scipy/scipy/blob/master/scipy/stats/_multivariate.py -- Robert Kern

Right; since these are compact groups so they should have a const pdf, I suppose dependent on dimension. So I should declare a new class, inherit from multi_rv_generic, and put my code into rvs, with dimension as an input? Do I need to define additional public functions (pdf, entropy), or are they all optional? Sent from my BlackBerry device on the Rogers Wireless Network -----Original Message----- From: Robert Kern <robert.kern@gmail.com> Sender: "SciPy-Dev" <scipy-dev-bounces@scipy.org>Date: Wed, 28 Oct 2015 13:07:23 To: SciPy Developers List<scipy-dev@scipy.org> Reply-To: SciPy Developers List <scipy-dev@scipy.org> Cc: Tiziano Zito<tiziano.zito@bccn-berlin.de> Subject: Re: [SciPy-Dev] Random matrices _______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org https://mail.scipy.org/mailman/listinfo/scipy-dev

On Thu, Oct 29, 2015 at 9:55 PM, <philip.deboer@gmail.com> wrote:
Right; since these are compact groups so they should have a const pdf, I
suppose dependent on dimension.
So I should declare a new class, inherit from multi_rv_generic, and put
my code into rvs, with dimension as an input?
Do I need to define additional public functions (pdf, entropy), or are
they all optional? I think they are all optional. -- Robert Kern
participants (3)
-
Philip DeBoer
-
philip.deboer@gmail.com
-
Robert Kern