Closed mhlinder closed 9 months ago
The implementation of tsss
is a pretty straight translation of the python version at https://github.com/lmcinnes/pynndescent/blob/d99a821b0ed27cf97af16b688568be9838c1e397/pynndescent/distances.py#L498 and seems to give the same numerical results.
But from a closer reading of the paper and your comments it does seem like we are missing a factor of 1/2. So this seems like a bug.
This will be fixed in the next release of rnndescent. Thank you for reporting @mhlinder!
The original TS-SS paper expresses angles in degrees, which is different from the radians used in the code.
This is correctly accounted for in places like here, where the authors' "10 degrees" are converted to radians.
Equation (6) in the paper gives the equation (using angle
theta_degrees
in degrees)I believe the corresponding equation for radians should be
However, in the implementation here, the factor of 1/2 is missing.
Is there a reason for that? Or should the value be scaled by 1/2?