| Crates.io | mv-norm |
| lib.rs | mv-norm |
| version | 0.1.6 |
| created_at | 2025-04-21 05:19:43.874229+00 |
| updated_at | 2025-04-30 19:40:36.876365+00 |
| description | Multivariate Normal Distribution functions, CDF etc. |
| homepage | |
| repository | https://github.com/cbeck88/mv-norm-rs |
| max_upload_size | |
| id | 1642305 |
| size | 87,799 |
Fast and accurate calcluations related to multivariate normal distributions, in pure rust. (Note: Right now we only have the bivariate normal CDF.)
This rust crate ports a subset of the R package mvtnorm, which is
widely used for these purposes.
Additionally, this crate provides "batch evaluation" APIs which may be much faster if you need to evaluate many points. These APIs are designed to allow easy precomputation based on some of the parameters, so that work is shared across many evaluations, and to take advantage of SIMD.
A common practice for statistics, numerical integration, modeling, etc. is:
In this crate, we ported fortran code such as Alan Genz' tvpack algorithm, and tested against the original for fidelity.
Then we used wide and precomputation tricks to make it significantly faster, especially in a batch evaluation, where we get more then 5x improved throughput (but run benchmarks to see if you can repro this.)
This greatly accelerated a numerical integration routine for a statistical model.
mvtnorm sources, and use Rust's nice SIMD facilities to optimize them. (Eventually, the core::simd stuff when it is stabilized.) For example support for Genz-Bretz, or the tvpack trivariate normal CDF routine, would be great.f32 version of algorithms, especially if it can be significantly faster.boost::math, I'm not sure.GPLv2, because we ported code from mvtnorm which is GPLv2 licensed.