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

Class JaccardDistance<T>

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


    public class JaccardDistance<T>
    extends java.lang.Object
    implements Distance<T[]>, java.io.Serializable
    The Jaccard index, also known as the Jaccard similarity coefficient is a statistic used for comparing the similarity and diversity of sample sets. The Jaccard coefficient measures similarity between sample sets, and is defined as the size of the intersection divided by the size of the union of the sample sets. The Jaccard distance, which measures dissimilarity between sample sets, is complementary to the Jaccard coefficient and is obtained by subtracting the Jaccard coefficient from 1, or, equivalently, by dividing the difference of the sizes of the union and the intersection of two sets by the size of the union.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      JaccardDistance()
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static <T> double d(java.util.Set<T> a, java.util.Set<T> b)
      Returns the Jaccard distance between sets.
      double d(T[] a, T[] b)
      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

      • JaccardDistance

        public JaccardDistance()
        Constructor.
    • Method Detail

      • toString

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

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

        public static <T> double d(java.util.Set<T> a,
                                   java.util.Set<T> b)
        Returns the Jaccard distance between sets.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.