Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angle Theta converted 2x to radian #9

Open
ClemensKohl opened this issue Jul 17, 2023 · 1 comment
Open

angle Theta converted 2x to radian #9

ClemensKohl opened this issue Jul 17, 2023 · 1 comment

Comments

@ClemensKohl
Copy link

ClemensKohl commented Jul 17, 2023

Hi,

thanks a lot for the great implementation of TS-SS!
I noticed that in your as well as all other implementations I have found, the angle theta is converted to radians, although it already is in radian.

See the following line here:
https://github.com/taki0112/Vector_Similarity/blob/3a1f6248aba6be8eed865339a26e800dcf02c028/python/TS_SS/Vector_Similarity.py#L20C1-L20C43

Is there a reason for this conversion? As far as I can tell Theta() outputs the angle in radian (as also demonstrated by the fact that we add math.radian(10) to the acos).

Similarly, the area of the sector is calculated with the formula for the angle in degrees, but again, as far as I can tell Theta is in radian.

Thanks a lot in advance!
Clemens

@mhlinder
Copy link

mhlinder commented Dec 6, 2023

Additionally, theta is normalized by 360 -- however, I believe this should be 2*pi (?), since theta is in radians

An R implementation uses the correct factor: https://github.com/jlmelville/rnndescent/blob/master/inst/include/tdoann/distance.h#L576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants