This is a math question related to machine learning.
I have a data set I want to cluster and to do this I want to define a bespoke distance function. My understanding of the data is that the distance between numerical values depends on the scale. That is 9 is not very close to 10 but 900 is very close to 901.
Is there a natural mathematical distance function (or transformation) that encapsulates this intuition? Ideally it would be parameterized so I can grid search to find good distance functions.
you could define a relative measure of distance: D = V1 / V2 - 1 Using this, D = 9 / 10 -1 = -0.1 , that is, 9 is 10% lesser than 10. Another example, D = 201 / 200 -1 = 0.005 , that is, 201 is 5% bigger than 200. Obviously this definition doesn't work if your reference V2 is zero.