Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get bandwidth obtained from kde_lscv #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

2 participants