Skip to content

Add a strict sliding‑window estimate to the eda_dens function #1

@mgimond

Description

@mgimond

For pedagogical reasons, I will add a sliding-window estimator (for a rectangular kernel) to eda_dens. The estimate will take on the form:

strict_kde <- function(x, y, bw) {
  n <- length(y)
  sapply(x, function(x0) {
    sum(abs(y - x0) <= (bw/2) ) / (n * bw)
  })
}

where x is a vector of x values for which density values are to be computed , y is the batch of values whose density is estimated and bw is the full bandwidth of the rectangular kernel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions