-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding the complex multivariate normal distribution #7212
Comments
|
|
|
Thanks @NeilGirdhar , looks like an interesting distribution to add. Could you submit your code as a pull quest? The code looks good to me from a quick browse (I didn't test it). Only a couple of comments:
|
@rgommers Thanks for the feedback. I'm very busy with school and was initially thinking that I would leave this code in scipy's capable hands. However, I think I can find some time to get this in if you don't mind helping minimize the back and forth. (When I worked on PEP 448, it took a lot longer than I anticipated although not through anyone's fault.) Would you mind commenting on my use of How would you test circularly-symmetric normal? It sounds like you know, but just so we're on the same page, it is the special case of multivariate normal with zero pseudo-covariance and mean. |
A SciPy PR is nowhere near as bad as a PEP. Not much in Python land is as bad as a PEP to be fair:)
That's not a common patterns at all, but it looks better than some of the approaches to handling broadcasting in the The
It should have all parameters that
Maybe make your life easy and always return
Yes, I know. I meant that in testing you can create that distribution and then check for properties that it should have, e.g. "The density function depends only on the magnitude of z but not on its argument" |
Thank you. Good idea regarding the circular test. Just to confirm. I'm writing two distributions: |
Ah, I missed that so far, but yes indeed. Then I have to amend by comment about inheritance: the multivariate distribution should inherit from |
Okay, I think I have a first draft for one of the distributions. I'm having trouble making it work with complex arguments.
|
You put it in
The you can run the tests by |
That's quite a few places to add the distribution to, we should write that down somewhere .... |
@rgommers Thanks. It looks like it's starting to work, but it has trouble accepting complex-valued parameters. Would you mind taking a look at the distribution infrastructure to see how we could accept complex-valued parameters? |
Can you either point me to the branch you're working in, or send a WIP (work-in-progress) PR? Then I'm happy to have a look. |
I think it's this but I might have to put it into a new fork? NeilGirdhar@f4d6f04 |
thanks
Sorry, I've been distracted so missed that reply. Yes, you've been committing on your master branch. It's better to create a new branch and send a WIP PR from there. |
Looking at |
That method converts the univariate complex normal variance and pseudo-variance into a multivariate normal distribution's variance matrix. That's avoids reimplementing methods like |
Please consider adding the complex multivariate normal distribution.
A helpful reference: Picinbono, B. (1996). Second-order complex random vectors and normal distributions. IEEE Transactions on Signal Processing, 44(10), 2637–2640. http://doi.org/10.1109/78.539051
The Wikipedia page is enough to fill in most of what is needed for a distribution.
I have added code that implements
rvs
andpdf
below along with some tests.The text was updated successfully, but these errors were encountered: