4

I am not able to find an existing name for the comparison function I wrote.

I have two lists of values which I want to compare. At first I used jaccard, but then I recognized I need to eliminate the length of the second list as it does not seem to have anything to say in my use-case. So I changed jaccard to:

$$ sim(L1,L2) = \frac{|L1 \cap L2|}{|L1|} $$

One example might be:

L1 = {name, test, somevalue}
L2 = {name, foo, bar, baz, some, random, other, values, which, would,
      flood, the, jaccard, comparison, as, they, are, too, much}

$$ sim(L1,L2) = \frac{|L1 \cap L2|}{|L1|} = \frac{|\{name\}|}{|\{name, test, somevalue\}|} = \frac{1}{3} $$

To make a long story short, I only want to calculate how many percent of the values in L1 are in L2. Does anybody know if there is a name for such a function so I can give it a good name within my source code?

1 Answers1

2

From where I stand it looks like the conditional relative frequency of $L2$ given $L1$.

NRH
  • 18,095