Documentation of 'smile.math.distance.JensenShannonDistance' Java class
JensenShannonDistance
smile.math.distance

Class JensenShannonDistance

  • All Implemented Interfaces:
    java.io.Serializable, Distance<double[]>, Metric<double[]>


    public class JensenShannonDistance
    extends java.lang.Object
    implements Metric<double[]>, java.io.Serializable
    The Jensen-Shannon divergence is a popular method of measuring the similarity between two probability distributions. It is also known as information radius or total divergence to the average.

    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.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double d(double[] x, double[] y)
      Returns the distance measure between two objects.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JensenShannonDistance

        public JensenShannonDistance()
        Constructor.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • d

        public double d(double[] x,
                        double[] y)
        Description copied from interface: Distance
        Returns the distance measure between two objects.
        Specified by:
        d in interface Distance<double[]>

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.