kernel_density_estimation/lib.rs
1//! Kernel density estimation in Rust.
2//!
3//! Kernel density estimation (KDE) is a non-parametric method to estimate the probability
4//! density function of a random variable by taking the summation of kernel functions centered
5//! on each data point. This crate serves three major purposes based on this idea:
6//! 1) Evaluate the probability density function of a random variable.
7//! 2) Evaluate the cumulative distribution function of a random variable.
8//! 3) Sample data points from the probability density function.
9//!
10//! An excellent technical description of the method is available
11//! [here](https://bookdown.org/egarpor/NP-UC3M/kde-i.html)[^citation].
12//!
13//! [^citation]: García-Portugués, E. (2022). Notes for Nonparametric Statistics.
14//! Version 6.5.9. ISBN 978-84-09-29537-1.
15
16#[warn(missing_docs)]
17pub mod bandwidth;
18pub mod float;
19mod internal;
20pub mod kde;
21pub mod kernel;
22
23pub mod prelude {
24 //! `use kernel_density_estimation::prelude::*;` to import all common functionality.
25
26 pub use crate::bandwidth::scott::Scott;
27 pub use crate::bandwidth::silverman::Silverman;
28 pub use crate::bandwidth::Bandwidth;
29
30 pub use crate::float::KDEFloat;
31
32 pub use crate::kde::univariate::UnivariateKDE;
33 pub use crate::kde::KernelDensityEstimator;
34
35 pub use crate::kernel::cosine::Cosine;
36 pub use crate::kernel::epanechnikov::Epanechnikov;
37 pub use crate::kernel::logistic::Logistic;
38 pub use crate::kernel::normal::Normal;
39 pub use crate::kernel::quartic::Quartic;
40 pub use crate::kernel::sigmoid::Sigmoid;
41 pub use crate::kernel::silverman::SilvermanKernel;
42 pub use crate::kernel::triangular::Triangular;
43 pub use crate::kernel::tricube::Tricube;
44 pub use crate::kernel::triweight::Triweight;
45 pub use crate::kernel::uniform::Uniform;
46 pub use crate::kernel::Kernel;
47}