Description Usage Arguments Value Examples
View source: R/04_comparison_metrics.R
Computes the chi-squared distance between each element of a pair of vectors which must be of the same length. Good for comparing color histograms if you don't want to weight by color similarity. Probably hugely redundant; alas.
1 | chisqDistance(a, b)
|
a |
Numeric vector. |
b |
Numeric vector; must be the same length as a. |
Chi-squared distance, (a - b)^2/(a + b), between vectors a and b. If one or both elements are NA/NaN, contribution is counted as a 0.
1 | colordistance:::chisqDistance(rnorm(10), rnorm(10))
|
[1] 9.498323
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.