convergence_rate {kldest} | R Documentation |
Empirical convergence rate of a KL divergence estimator
Description
Subsampling-based confidence intervals computed by kld_ci_subsampling()
require the convergence rate of the KL divergence estimator as an input. The
default rate of 0.5
assumes that the variance term dominates the bias term.
For high-dimensional problems, depending on the data, the convergence rate
might be lower. This function allows to empirically derive the convergence
rate.
Usage
convergence_rate(
estimator,
X,
Y = NULL,
q = NULL,
n.sizes = 4,
spacing.factor = 1.5,
typical.subsample = function(n) sqrt(n),
B = 500L,
plot = FALSE
)
Arguments
estimator |
A KL divergence estimator. |
X , Y |
|
q |
The density function of the approximate distribution |
n.sizes |
Number of different subsample sizes to use (default: |
spacing.factor |
Multiplicative factor controlling the spacing of sample
sizes (default: |
typical.subsample |
A function that produces a typical subsample size,
used as the geometric mean of subsample sizes (default: |
B |
Number of subsamples to draw per subsample size. |
plot |
A boolean (default: |
Details
References:
Politis, Romano and Wolf, "Subsampling", Chapter 8 (1999), for theory.
The implementation has been adapted from lecture notes by C. J. Geyer, https://www.stat.umn.edu/geyer/5601/notes/sub.pdf
Value
A scalar, the parameter \beta
in the empirical convergence
rate n^-\beta
of the estimator
to the true KL divergence.
It can be used in the convergence.rate
argument of kld_ci_subsampling()
as convergence.rate = function(n) n^beta
.
Examples
# NN method usually has a convergence rate around 0.5:
set.seed(0)
convergence_rate(kld_est_nn, X = rnorm(1000), Y = rnorm(1000, mean = 1, sd = 2))