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.