statrs-dev / statrs

Statistical computation library for Rust
https://docs.rs/statrs/latest/statrs/
MIT License
567 stars 81 forks source link

statrs and puruspe integration #105

Closed saona-raimundo closed 2 months ago

saona-raimundo commented 4 years ago

Hi there!!

Thank you very much for your great work!!

I am using Rust for numerical computations and was wondering about the best place to take special functions from.

I came across the module statrs::function and saw also the puruspe crate, which is used in the peroxide crate.

So, my question is: Would it not be better to join efforts and have and have the "best" source for special functions in one place?

I sent a similar message to the peroxide author. Hope this turns out great! :D

boxtown commented 4 years ago

I agree I think having a "central" source for statistical/mathematical utilities in Rust would be great! I believe there was some discussion about moving at least the distributions under rust-rand or at least a related crate but I haven't been keeping up with that discussion, @dhardy might know better.

That being said this project has been essentially in maintenance mode for the past year and a half since I haven't had much free time to contribute to it.

The library is licensed under the MIT license though so I have no qualms with anyone who wants to fork/copy the code if it means consolidating efforts and providing a well maintained best-in-class library. Additionally, I'm always happy to review/accept PRs for new functionality or even to take some time to implement specific feature-requests if the community would rather just depend on statrs

dhardy commented 4 years ago

For Rand, we decided to leave the simpler distributions (uniform distributions including a few derivatives like for alphanumeric and vectors) in the main rand crate, and move the rest to rand_distr. We basically leave it up to users to choose whether to use statrs or rand_distr; there is a lot of overlap and we haven't made any attempt to unify things. But there are also several differences — a few different distributions, and rand_distr doesn't export any special functions or PDFs or CDFs. rand_distr also doesn't need many special functions — there's log_gamma and ziggurat which we define here. I think it doesn't make sense to depend on puruspe just for these — what we use doesn't really align with this crate's API anyway.

The other thing worth mentioning is that most open-source libs (including rand and statrs) almost always end up in a "minimal maintenance mode" sooner or later — I don't think we have enough interested parties to put significant work into revising things (contrary to first impressions, maintaining a single collection of high-quality functions may be more work than the alternative).

YeungOnion commented 2 months ago

I've a similar sentiment to boxtown and dhardy. I'll leave it up to users whether they wish to rely/contribute to this tool/another tool with the intent to have a best-in-class library. @saona-raimundo let me know if you've found one really pulling away from the pack.