smile.math.distance
Distance functions.
Attributes
Members list
Type members
Classlikes
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.
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.
Attributes
- Supertypes
-
trait Distance[Array[Int]]trait Serializabletrait ToDoubleBiFunction[Array[Int], Array[Int]]class Objecttrait Matchableclass AnyShow all
Mean Mahantan distance. Compared to regular Manhattan distance, it normalizes the distance by the sum of contingency table values.
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
Attributes
- Supertypes
-
trait Distance[Array[Int]]trait Serializabletrait ToDoubleBiFunction[Array[Int], Array[Int]]class Objecttrait Matchableclass AnyShow all
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
Attributes
- Supertypes
-
trait Distance[Array[Int]]trait Serializabletrait ToDoubleBiFunction[Array[Int], Array[Int]]class Objecttrait Matchableclass AnyShow all
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
Attributes
- Supertypes
-
trait Distance[Array[Int]]trait Serializabletrait ToDoubleBiFunction[Array[Int], Array[Int]]class Objecttrait Matchableclass AnyShow all
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
Attributes
- Supertypes
-
trait Distance[Array[Int]]trait Serializabletrait ToDoubleBiFunction[Array[Int], Array[Int]]class Objecttrait Matchableclass AnyShow all
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
Attributes
- Supertypes
-
trait Distance[Array[Int]]trait Serializabletrait ToDoubleBiFunction[Array[Int], Array[Int]]class Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
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
