2 unstable releases

0.2.0 Mar 22, 2024
0.1.0 Oct 16, 2022

#742 in Algorithms

Download history 10/week @ 2024-01-09 4/week @ 2024-01-16 18/week @ 2024-01-23 2/week @ 2024-02-13 17/week @ 2024-02-20 53/week @ 2024-02-27 50/week @ 2024-03-05 34/week @ 2024-03-12 164/week @ 2024-03-19 68/week @ 2024-03-26 76/week @ 2024-04-02

354 downloads per month

MIT license

185KB
691 lines

kernel-density-estimation

Crates.io Crates.io Crates.io

Kernel density estimation in Rust.

Kernel density estimation (KDE) is a non-parametric method to estimate the probability density function of a random variable by taking the summation of kernel functions centered on each data point. This crate serves three major purposes based on this idea:

  1. Evaluate the probability density function of a random variable.
  2. Evaluate the cumulative distribution function of a random variable.
  3. Sample data points from the probability density function.

An excellent technical description of the method is available here.

Note: Currently only univariate distributions are supported but multivariate is a goal in the future!

Examples

univariate - This example showcases the core pdf, cdf, and sample functionalities for a univariate distribution.

cargo run --example univariate

Univariate Distribution

kernel - This example showcases each of the available kernel functions.

cargo run --example kernel

Kernel Functions

Roadmap

Refer to the milestone issues to see the direction the project is headed in future releases or CHANGELOG.md to see the changes between each release.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

  • Notes for Nonparametric Statistics[^citation] - An excellent technical description of nonparametric methods referenced heavily in the development of this project.

[^citation]: García-Portugués, E. (2022). Notes for Nonparametric Statistics. Version 6.5.9. ISBN 978-84-09-29537-1.

Dependencies

~3MB
~57K SLoC