Definition of Similar Distance
Definition
A function $d: X \times X \to [0, \infty)$ that satisfies the other conditions of a distance function but does not satisfy $d(x,y)= \implies x=y$ is called a pseudo metric.
Explanation 1
In a metric space $\left( X , d \right)$, it is sometimes convenient to use the following notations:
- One may denote the distance $d_{1}$ between a point $x \in X$ and a set $A \subset X$ as follows. $$ d_{1} \left( x , A \right) = \inf_{a \in A} d \left( x , a \right) $$
- One may denote the distance $d_{2}$ between sets $A, B \subset X$ as follows. $$ d_{2} \left( A , B \right) = \inf_{a \in A, b \in B} d \left( a , b \right) $$
Conceptually, the idea is simple enough to be accepted intuitively as soon as one sees the definition, and it can sometimes be practical. However, strictly speaking these do not produce bona fide distance functions (metrics). Apart from the ambiguity in the domain of $d_{1}$, even if one takes the domain of $d_{2}$ to be $2^{X} \times 2^{X}$, for $A, B$ that are not disjoint $d_{2} \left( A , B \right) = 0$ does not guarantee $A = B$.
Fréchet–Nikodym–Aronszajn distance
$$ A \nabla B := \left( A \cup B \right) \setminus \left( A \cap B \right) = \left( A \setminus B \right) \cup \left( B \setminus A \right) $$
There were attempts to exclude the possibility of overlap. For example, for the operator $\nabla$ defined above, one can define $\delta : \mathcal{E} \times \mathcal{E} \to [0, \infty)$ on the sigma-algebra of the measure space $\left( X , \mathcal{E}, \mu \right)$ as follows. $$ \delta \left( A , B \right) := \mu \left( A \nabla B \right) $$ In other words, the intention is to include not only location but also the shape of sets in the notion of distance, yet $delta$ remains a pseudo metric despite being called the Fréchet–Nikodym–Aronszajn distance.
Markzewski–Steinhaus distance
One way to normalize $\delta$ is to divide by $\mu (X)$, but that requires $\mu$ to be a finite measure. Therefore one can instead consider dividing by $\mu \left( A \cup B \right)$ as follows. $$ \delta ' \left( A , B \right) = {\frac{ \delta \left( A , B \right) }{ \mu \left( A \cup B \right) }} = 1 - {\frac{ \mu \left( A \cap B \right) }{ \mu \left( A \cup B \right) }} \qquad , \mu \left( A \cup B \right) \ne 0 $$ $\delta ' : \mathcal{E} \times \mathcal{E} \to [0, \infty)$ is called the Markzewski–Steinhaus distance, but as the definition indicates it still falls short of escaping the morass of pseudo metrics.
Jaccard distance
As observed above, defining a distance between sets is harder than one might expect. This is because, contrary to intuition, the concept of a set is very permissive; even when sets share similar structure, one may need to relax conditions to obtain a metric. If $X$ is a finite set, one can define $\delta '' : 2^{X} \times 2^{X} \to [0, \infty)$ for the cardinality $\left| \cdot \right|$ of sets as follows. $$ \delta '' \left( A , B \right) = 1 - {\frac{ \left| A \cap B \right| }{ \left| A \cup B \right| }} \qquad , \left| A \cup B \right| \ne 0 $$ Formally, this is the finite version of the Markzewski–Steinhaus distance, and $\delta ''$ is called the Jaccard distance. In practice, if you are familiar with data science, you will recognize that the term subtracted from 1 is what is called the Jaccard coefficient.
In other words, the notion of distance between sets only becomes clear if one is willing to retreat to such permissive conditions. From a practical standpoint, using notations like $d_{1}$ or $d_{2}$ is fine, but it is arguable that digging deeply into them is not particularly productive.
