2
$\begingroup$

Let X and Y be probability vectors, meaning that X = $[x_1, x_2, ..., x_n]^T$, where $x_i\leq 1$ and $\sum_{i=1}^{n}x_i=1$ (Y is defined similarly).

Define the Jaccard distance as

\begin{equation} J_d = 1 - \frac{\textbf{X}\cdot\textbf{Y}}{\textbf{X}\cdot \textbf{X}+ \textbf{Y}\cdot\textbf{Y} - \textbf{X}\cdot\textbf{Y}} \end{equation}

Is $J_d$ a proper distance (i.e., metric)?

$\endgroup$
6
  • $\begingroup$ Hi! I think you should add your own thoughts and work on this question. $\endgroup$ Commented May 12, 2021 at 8:48
  • $\begingroup$ Seems similar to mathoverflow.net/questions/18084/… (not exactly because that question has cardinalities of sets, but similar methods probably work). $\endgroup$ Commented May 12, 2021 at 8:49
  • $\begingroup$ It looks like a different question (with different answer). $\endgroup$ Commented May 12, 2021 at 8:53
  • 1
    $\begingroup$ Does this answer your question? Is the Jaccard distance a distance? $\endgroup$
    – Gro-Tsen
    Commented May 12, 2021 at 11:59
  • 1
    $\begingroup$ @Gro-Tsen The Jaccard distance is indeed a metric when applied with bits vectors. My question was regarding the application of this distance with probability vectors (i.e., distribution vectors). $\endgroup$
    – Yaz
    Commented May 12, 2021 at 13:24

1 Answer 1

2
$\begingroup$

No, it is not. For fixed $Y$, fixed $Z=(z_1,\ldots,z_n)$ with $\sum z_i=0$, and small $t$ we have $J_d(Y\pm tZ, Y)\sim t^2 \frac{Z\cdot Z}{Y\cdot Y}$, but $$J_d(Y-tZ,Y+tZ)\sim 4t^2\frac{Z\cdot Z}{Y\cdot Y}>J_d(Y-tZ,Y)+J_d(Y,Y+tZ).$$

$\endgroup$
3
  • $\begingroup$ I believe the vector Z should be constrained such that Y + t Z remains in the space of probability distribution vectors. If this constraint is applied to Z, does this triangular inequality remain violated? $\endgroup$
    – Yaz
    Commented May 12, 2021 at 15:18
  • $\begingroup$ If all coordinates of $Y$ are positive and $\sum z_i=0$, it remains for small values if $t$. $\endgroup$ Commented May 12, 2021 at 15:47
  • $\begingroup$ If you want a concrete example, take $Y=(0.5,0.5)$, $Z=(0.1,-0.1)$ and $t=1$ in Fedor's answer. You obtain $(0.5,0.5)$, $(0.4,0.6)$ and $(0.6,0.4)$ that indeed violate the triangle inequality. $\endgroup$ Commented May 12, 2021 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .