| kde_polysph | R Documentation |
Computes the kernel density estimator for data on the
polysphere \mathbb{S}^{d_1} \times \cdots \times \mathbb{S}^{d_r}.
Given a sample \boldsymbol{X}_1,\ldots,\boldsymbol{X}_n, this
estimator is
\hat{f}(\boldsymbol{x};\boldsymbol{h})=\sum_{i=1}^n
L_{\boldsymbol{h}}(\boldsymbol{x},\boldsymbol{X}_i)
for a kernel L and a vector of bandwidths \boldsymbol{h}.
kde_polysph(
x,
X,
d,
h,
weights = as.numeric(c()),
log = FALSE,
wrt_unif = FALSE,
normalized = TRUE,
intrinsic = FALSE,
norm_x = FALSE,
norm_X = FALSE,
kernel = 1L,
kernel_type = 1L,
k = 10,
loo = FALSE
)
x |
a matrix of size |
X |
a matrix of size |
d |
vector of size |
h |
vector of size |
weights |
weights for each observation. If provided, a vector of size
|
log |
compute the logarithm of the density? Defaults to |
wrt_unif |
flag to return a density with respect to the uniform
measure. If |
normalized |
flag to compute the normalizing constant of the kernel and
include it in the kernel density estimator. Defaults to |
intrinsic |
use the intrinsic distance, instead of the
extrinsic-chordal distance, in the kernel? Defaults to |
norm_x, norm_X |
ensure a normalization of the data? Defaults to
|
kernel |
kernel employed: |
kernel_type |
type of kernel employed: |
k |
softplus kernel parameter. Defaults to |
loo |
leave-one-out: skip the |
A column matrix of size c(nx, 1) with the evaluation of the
kernel density estimator.
García-Portugués, E. and Meilán-Vila, A. (2026). Kernel density estimation with polyspherical data and its applications. Journal of the American Statistical Association, 121(553):427–439. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.2025.2521898")}
log_cv_kde_polysph,
grad_hess_kde_polysph, r_kde_polysph,
bw_rot_polysph, bw_cv_polysph,
bw_mrot_polysph.
# Simple check on S^1 x S^2
n <- 1e3
d <- c(1, 2)
mu <- c(0, 1, 0, 0, 1)
kappa <- c(5, 5)
h <- c(0.2, 0.2)
X <- r_vmf_polysph(n = n, d = d, mu = mu, kappa = kappa)
kde_polysph(x = rbind(mu), X = X, d = d, h = h)
d_vmf_polysph(x = rbind(mu), d = d, mu = mu, kappa = kappa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.