Trait hyperopt::kernel::Kernel

source ·
pub trait Kernel {
    type Param;

    // Required method
    fn new(location: Self::Param, std: Self::Param) -> Self;
}
Expand description

A single kernel of a kernel density estimator.

Note that it does not directly correspond to the mathematical definition, as for example, it is responsible for its own shift and scaling. This is useful for discrete kernels which do not normally have a bandwidth parameter h.

Required Associated Types§

Required Methods§

source

fn new(location: Self::Param, std: Self::Param) -> Self

Construct a kernel with the given location and bandwidth.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<P, D> Kernel for Binomial<P, D>
where Self: Density<Param = P, Output = D> + Sample<Param = P>, P: Copy + Ord + MaxN + Additive + Multiplicative + Into<D> + One, D: Multiplicative,

§

type Param = P

source§

impl<P, D> Kernel for Uniform<P, D>
where Self: Density<Param = P, Output = D> + Sample<Param = P>, P: Copy + Additive + Multiplicative + Into<f64> + From<f64> + PartialOrd + Zero,

§

type Param = P

source§

impl<T> Kernel for Epanechnikov<T>
where Self: Density<Param = T, Output = T> + Sample<Param = T>, T: PartialOrd + Zero,

§

type Param = T

source§

impl<T> Kernel for Gaussian<T>
where Self: Density<Param = T, Output = T> + Sample<Param = T>, T: PartialOrd + Zero,

§

type Param = T