Skip to content

Conversation

m-wells
Copy link

@m-wells m-wells commented Mar 20, 2019

I created a new function that returns the bandwidth found from kde_lscv.

@PaulSoderlind
Copy link
Contributor

Something like this is needed. Just to mention one reason: the pointwise sampling variance of the density estimate typically depends on both the bandwidth and the shape of the kernel (see Silverman 1986 ch. 3.3)

I was thinking of instead changing the UnivariateKDE object to include the kernel, something like:

mutable struct UnivariateKDE{R<:AbstractRange} <: AbstractKDE
    "Gridpoints for evaluating the density."
    x::R
    "Kernel density at corresponding gridpoints `x`."
    density::Vector{Float64}
    "Kernel"
    dist::UnivariateDistribution
end

Then, the output of the kde_lscv() could be
UnivariateKDE(k.x, dens, dist)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants