Expand description
Probability distribution functions applied element-wise to matrices.
Includes approximations for the normal, uniform and gamma distributions as well as the error function.
use rustframe::compute::stats::distributions;
use rustframe::matrix::Matrix;
let x = Matrix::from_vec(vec![0.0], 1, 1);
let pdf = distributions::normal_pdf(x.clone(), 0.0, 1.0);
assert!((pdf.get(0,0) - 0.3989).abs() < 1e-3);
Functions§
- binomial_
cdf - CDF of the Binomial(n, p) for matrices
- binomial_
pmf - PMF of the Binomial(n, p) distribution for matrices
- erf
- Approximation of the error function for matrices
- gamma
- gamma_
cdf - CDF of the Gamma distribution for matrices
- gamma_
pdf - PDF of the Gamma distribution for matrices
- lower_
incomplete_ gamma - Lower incomplete gamma for matrices
- normal_
cdf - CDF of the Normal distribution for matrices
- normal_
pdf - PDF of the Normal distribution for matrices
- poisson_
cdf - CDF of the Poisson(λ) distribution for matrices
- poisson_
pmf - PMF of the Poisson(λ) distribution for matrices
- uniform_
cdf - CDF of the Uniform distribution on [a, b] for matrices
- uniform_
pdf - PDF of the Uniform distribution on [a, b] for matrices