Class Kulczynski2Similarity

  • All Implemented Interfaces:
    PrimitiveSimilarity<NumberVector>, Similarity<NumberVector>

    @Reference(authors="M.-M. Deza, E. Deza",
               title="Dictionary of distances",
               booktitle="Dictionary of distances",
               url="https://doi.org/10.1007/978-3-642-00234-2",
               bibkey="doi:10.1007/978-3-642-00234-2")
    public class Kulczynski2Similarity
    extends AbstractVectorSimilarity
    Kulczynski similarity 2.

    \[ s_\text{Kulczynski-2}(\vec{x},\vec{y} := \tfrac{n}{2}\left(\tfrac{1}{\bar{x}}+\tfrac{1}{\bar{y}}\right) \sum\nolimits_i\min\{x_i,y_i\} \]

    Reference:

    M.-M. Deza and E. Deza
    Dictionary of distances

    TODO: add an optimized version for binary data.

    Since:
    0.6.0
    Author:
    Erich Schubert
    • Constructor Detail

      • Kulczynski2Similarity

        @Deprecated
        public Kulczynski2Similarity()
        Deprecated.
        Use STATIC_CONTINUOUS instance instead.
        Constructor.
    • Method Detail

      • similarity

        public double similarity​(NumberVector v1,
                                 NumberVector v2)
        Description copied from interface: PrimitiveSimilarity
        Computes the similarity between two given DatabaseObjects according to this similarity function.
        Parameters:
        v1 - first DatabaseObject
        v2 - second DatabaseObject
        Returns:
        the similarity between two given DatabaseObjects according to this similarity function