| kde_gaussian | R Documentation |
Computes a multivariate Gaussian kernel density estimate at the rows of 'x', using 'data' as the reference sample. Bandwidths are set internally via Scott's rule-of-thumb (diagonal). For 2D, a manually optimized version is used; for higher dimensions, an Eigen-based vectorized version is used.
kde_gaussian(x, data)
x |
Numeric matrix 'n_eval x p' (evaluation points). |
data |
Numeric matrix 'n_data x p' (reference sample for KDE). |
Numeric vector of length 'n_eval' with the density estimates.
x <- as.matrix(example_env_occ_2d)
data <- as.matrix(example_env_m_2d)
dens <- kde_gaussian(x, data)
head(dens)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.