Following this paper and this paper, I'm trying to implement the formula for the Lorentzian distance between 2 points (aka the distance between 2 points in Lorentzian space). I'll use this a the distance metric for a KNN classifier.
According to the papers, the distance looks something like this:
where n is the number of dimensions (features), and X and Y are 2 points represented by vectors of features [X1, X2, ... , Xn] and [Y1, Y2, ... , Yn]
If I'm reading the formula correctly, the right hand term inside the square root is always going to be the absolute difference value between the 2 points for the last feature n, then squared. However, this right term is subtracted from the other squared term on the left, so at first it seems to be possible to end up with a negative value inside the square root. And indeed, when I tried this metric against my dataset, some terms errored out because of a negative value inside the square root. My dataset features were all normalized via minmax from 0-1.
It doesn't appear to be anywhere in the paper, at least to me, something to suggest the Lorentzian distance could be a complex number, unless I missed something.
Has anyone come across this metric for distance and know better than I? Or maybe I misread the papers or the formula somehow.
Any input would be much appreciated.
Thanks.