Class JeffreyDivergenceDistance

  • All Implemented Interfaces:
    Distance<NumberVector>, NumberVectorDistance<NumberVector>, PrimitiveDistance<NumberVector>, SpatialPrimitiveDistance<NumberVector>
    Direct Known Subclasses:
    JensenShannonDivergenceDistance

    @Reference(authors="H. Jeffreys",title="An invariant form for the prior probability in estimation problems",booktitle="Proc. Royal Society A: Mathematical, Physical and Engineering Sciences 186(1007)",url="https://doi.org/10.1098/rspa.1946.0056",bibkey="doi:10.1098/rspa.1946.0056") @Reference(authors="J. Puzicha, J. M. Buhmann, Y. Rubner, C. Tomasi",title="Empirical evaluation of dissimilarity measures for color and texture",booktitle="Proc. 7th IEEE International Conference on Computer Vision",url="https://doi.org/10.1109/ICCV.1999.790412",bibkey="DBLP:conf/iccv/PuzichaRTB99") @Reference(authors="F. Tops\u00f8e",title="Some inequalities for information divergence and related measures of discrimination",booktitle="IEEE Transactions on information theory, 46(4)",url="https://doi.org/10.1109/18.850703",bibkey="DBLP:journals/tit/Topsoe00") @Reference(authors="D. M. Endres, J. E. Schindelin",title="A new metric for probability distributions",booktitle="IEEE Transactions on Information Theory 49(7)",url="https://doi.org/10.1109/TIT.2003.813506",bibkey="DBLP:journals/tit/EndresS03")
    @Alias("j-divergence")
    public class JeffreyDivergenceDistance
    extends AbstractNumberVectorDistance
    implements SpatialPrimitiveDistance<NumberVector>
    Jeffrey Divergence for NumberVectors is a symmetric, smoothened version of the KullbackLeiblerDivergenceAsymmetricDistance. Topsøe called this "capacitory discrimination".

    \[JD(\vec{x},\vec{y}):= \sum\nolimits_i x_i\log\tfrac{2x_i}{x_i+y_i}+y_i\log\tfrac{2y_i}{x_i+y_i} = KL(\vec{x},\tfrac12(\vec{x}+\vec{y})) + KL(\vec{y},\tfrac12(\vec{x}+\vec{y}))\]

    Reference:

    H. Jeffreys
    An invariant form for the prior probability in estimation problems
    Proc. Royal Society A: Mathematical, Physical and Engineering Sciences 186(1007)

    J. Puzicha, J. M. Buhmann, Y. Rubner, C. Tomasi
    Empirical evaluation of dissimilarity measures for color and texture
    Proc. 7th IEEE International Conference on Computer Vision

    F. Topsøe
    Some inequalities for information divergence and related measures of discrimination
    IEEE Transactions on information theory, 46(4)

    D. M. Endres, J. E. Schindelin
    A new metric for probability distributions
    IEEE Transactions on Information Theory 49(7)

    TODO: add support for sparse vectors + varying length

    Since:
    0.5.0
    Author:
    Erich Schubert
    • Constructor Detail

      • JeffreyDivergenceDistance

        @Deprecated
        public JeffreyDivergenceDistance()
        Deprecated.
        Use static instance!
        Constructor for the Jeffrey divergence - use STATIC instead.
    • Method Detail

      • isSquared

        public boolean isSquared()
        Description copied from interface: Distance
        Squared distances, that would become metric after square root.

        E.g. squared Euclidean.

        Specified by:
        isSquared in interface Distance<NumberVector>
        Returns:
        true when squared.
      • toString

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object