I want to estimate the KL divergence between two continuous distributions f and g. However, I can't write down the density for either f or g. I can sample from both f and g via some method (for example, markov chain monte carlo).
The KL divergence from f to g is defined like this
$$D_{KL}(f || g) = \int_{-\infty}^{\infty} f(x) \log\left(\frac{f(x)}{g(x)}\right) dx$$
This is the expectation of $\log\left(\frac{f(x)}{g(x)}\right)$ with respect to f so you could imagine some monte carlo estimate
$$\frac{1}{N}\sum_i^N \log\left(\frac{f(x_i)}{g(x_i)}\right)$$
Where i indexes N samples that are drawn from f (i.e. $x_i \sim f()$ for i = 1, ..., N)
However, since I don't know f() and g(), I can't even use this monte carlo estimate. What is the standard way of estimating the KL in this situation?
EDIT: I do NOT know the unnormalized density for either f() or g()