{'fraction_non_alphanumeric': 0.07518796992481203, 'fraction_numerical': 0.015037593984962405, 'mean_word_length': 4.546296296296297, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Useful Facts about the Kullback-Leibler Discrimination Distance

This report contains a list of some of the more prominent properties and theorems concerning the Kullback-Leibler (KL) discrimination distance. A brief discussion is also provided indicating the type of problems in which the KL distance has been applied. References are provided for the reader’s convenience. 1 Definition For two continuous density functions f1(x), f2(x) the Kullback-Leibler (KL) distance between f1 relative to f2 is defined as the expected value of the likelihood ratio with respect to f1. D(f1 ‖ f2) = E1[− log(L)] (1) = ∫ f1(x) log f1(x) f2(x) dx (2) Here, L denotes the likelihood ratio, f2(x)/f1(x). To ensure the existence of the integral, we assume that the two densities are absolutely continuous with respect to one another (meaning that we assume they share the same support). Let X be a discrete random variable defined on the discrete outcome space X and consider two probability mass functions p(x), x ∈ X and q(x), x ∈ X . Then the KL distance between p(x) relative to q(x) is defined as, D(p ‖ q) = Ep[− logL] (3) = ∑ x∈X p(x) log p(x) q(x) (4) where L again denotes the likelihood ratio q(x)/p(x).