Is there some metric for computing similarity between two numbers which takes values in the interval $[0, 1]$?
I want something like:
$sim(1,1) = 1$
$sim(1,2) = 0.5$
...
...
$sim(50,47) = 0.78$
$sim(100,99) = 0.99$
If two numbers are small, then similarity is sensitive. But, if two numbers are big, then similarity is less sensitive.
Is there some metric like that?
Did you try s(x,y) = 2min(x,y)/(x+y)?
This measure can be based on the following measure for the (absolute) proportional difference: r(x,y) =|x/(x+y) - y/(x+y)| = |x-y|/(x+y). Viz. s(x,y) = 1 - r(x,y).
Does anyone know whether these measures have been elaborated?
r(x,y) has very nice properties, e.g.