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$ May 12 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$ May 12 at 8:49
  • $\begingroup$ It looks like a different question (with different answer). $\endgroup$ May 12 at 8:53
  • 1
    $\begingroup$ Does this answer your question? Is the Jaccard distance a distance? $\endgroup$
    – Gro-Tsen
    May 12 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
    May 12 at 13:24
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
    May 12 at 15:18
  • $\begingroup$ If all coordinates of $Y$ are positive and $\sum z_i=0$, it remains for small values if $t$. $\endgroup$ May 12 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$ May 12 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.