-
Notifications
You must be signed in to change notification settings - Fork 307
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
Implement Multivariate normal distribution #583
base: master
Are you sure you want to change the base?
Conversation
I'm not sure why this is in ndarray-rand's scope, it's a bit unfortunate to depend on a specific linalg crate. I'd rather decline features (put it into a separate crate?) |
I made the dependency on linalg can be made optional, in which case you only get a standard normal distribution. Are there any other linalg crates than ndarray-linalg ? From what I see in its issue board the author was thinking about including it to this repo |
What is the intended scope for
IMO, it makes the most sense to be placed in However, it could be placed in Another option would be Are there any other multivariate random distributions that would justify the creation of a new crate?
There's
Are you referring to rust-ndarray/ndarray-linalg#126? That's talking about moving the |
@termoshtt What are your thoughts? Would you like to add this functionality to |
Not really. From the experience I have, the multivariate normal distribution is really the only standard multivariate distribution that has some interdependence between its variables. Modeling dependence between random variables of other distributions can be done using other tools like copulas, which can still rely on the normal distribution. Something like
Yes, I was referring to that. Since there is no actively-maintained alternative, @termoshtt 's crate seemed like the natural option, to put behind a feature gate. |
I was thinking about generating values according to a specified probability distribution this morning and I am curious as well to understand what is the scope of Functionalities for parameter estimation/ML would probably require a separate crate, but the Random variable bits in SciPy do seem fitting for |
So, would we be going ahead with this ? I still have a bit of work to do on this though, like adding tests when compiling with the optional feature. |
For some reason, I can't get the added normal distribution (with covariance matrix) to compile, I keep getting
Can anyone test this on their end ? |
The issue is that #[cfg(feature = "normaldist")]
pub mod advanced; Note that "normaldist" should also be added as a feature in Edit: Whoops, it looks like that wasn't the root cause of the problem. AFAICT, the root cause is a version mismatch. ( |
I thought using |
Yes, this feature is suitable to ndarray-linalg crate. I have moved ndarray-linalg to rust-math organization to manage with other math crates, but I still think it should be in rust-ndarray org to gather maintenance power. |
# Conflicts: # ndarray-rand/src/lib.rs # ndarray-rand/tests/tests.rs
Merge from upstream
Resolves #582