public class JensenShannonDistance extends Object implements Metric<double[]>
The Jensen-Shannon divergence is a symmetrized and smoothed version of the Kullback-Leibler divergence . It is defined by
J(P||Q) = (D(P||M) + D(Q||M)) / 2
where M = (P+Q)/2 and D(·||·) is KL divergence. Different from the Kullback-Leibler divergence, it is always a finite value.
The square root of the Jensen-Shannon divergence is a metric, which is calculated by this class.
Copyright © 2015. All rights reserved.