Package

smile.math

distance

Permalink

package distance

Distance functions.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. distance
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class Hamming extends Distance[Array[Int]]

    Permalink

    Hamming distance between two bit strings.

    Hamming distance between two bit strings. Note that we treat each integer in the input array as a bit string. In contrast, HammingDistance treats each integer in the input array as a single value.

  2. class MeanMahanttan extends Distance[Array[Int]]

    Permalink

    Mean Mahantan distance.

    Mean Mahantan distance. Compared to regular Manhattan distance, it normalizes the distance by the sum of contingency table values.

    References

    • Seung-Seok Choi, et al. A Survey of Binary Similarity and Distance Measures. http://www.iiisci.org/journal/CV$/sci/pdfs/GS315JG.pdf
  3. class PatternDifference extends Distance[Array[Int]]

    Permalink

    Pattern difference distance.

    Pattern difference distance.

    References

    • Seung-Seok Choi, et al. A Survey of Binary Similarity and Distance Measures. http://www.iiisci.org/journal/CV$/sci/pdfs/GS315JG.pdf
  4. class ShapeDifference extends Distance[Array[Int]]

    Permalink

    Shape Difference distance.

    Shape Difference distance.

    References

    • Seung-Seok Choi, et al. A Survey of Binary Similarity and Distance Measures. http://www.iiisci.org/journal/CV$/sci/pdfs/GS315JG.pdf
  5. class SizeDifference extends Distance[Array[Int]]

    Permalink

    Size Difference distance.

    Size Difference distance.

    References

    • Seung-Seok Choi, et al. A Survey of Binary Similarity and Distance Measures. http://www.iiisci.org/journal/CV$/sci/pdfs/GS315JG.pdf
  6. class Vari extends Distance[Array[Int]]

    Permalink

    Vari distance class.

    Vari distance class.

    References

    • Seung-Seok Choi, et al. A Survey of Binary Similarity and Distance Measures. http://www.iiisci.org/journal/CV$/sci/pdfs/GS315JG.pdf

Value Members

  1. def contingency(x: Array[Int], y: Array[Int]): (Int, Int, Int, Int)

    Permalink

    Build the contingency matrix (a, b, c, d) where for each bite i, j of vector 1 and 2 :

    Build the contingency matrix (a, b, c, d) where for each bite i, j of vector 1 and 2 :

    • a is incremented if i = 1, j = 1
    • b is incremented if i = 1, j = 0
    • c is incremented if i = 0, j = 1
    • d is incremented if i = 0, j = 0

Inherited from AnyRef

Inherited from Any

Ungrouped