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 calculation in high-Dim space #5

Open
ShuaiLYU opened this issue Dec 2, 2022 · 3 comments
Open

angle calculation in high-Dim space #5

ShuaiLYU opened this issue Dec 2, 2022 · 3 comments

Comments

@ShuaiLYU
Copy link

ShuaiLYU commented Dec 2, 2022

Hi, Thanks for you work.

May I ask can I use cosine similarity to represent the angle ? does it make sense ?

Best,
Lyus

@pdh-coder
Copy link
Member

Cosine similarity can be used in place of the angle when all angles are smaller than π in 2D space, since cos(x) is monotonically decreasing when x is smaller than π, that means the consistency of angles is equivalent to the cosine. However, when the largest angle is larger than π, it will be invalid. For example, three angles 0, 0, 2π, their variance is 8.77; while, their consines are 1, 1, 1 respectively, the variance reach to the minimum 0. Moreover, cosine similarity cannot represent the centrality for high-dimensional data.

@ShuaiLYU
Copy link
Author

ShuaiLYU commented Dec 7, 2022

Cosine similarity can be used in place of the angle when all angles are smaller than π in 2D space, since cos(x) is monotonically decreasing when x is smaller than π, that means the consistency of angles is equivalent to the cosine. However, when the largest angle is larger than π, it will be invalid. For example, three angles 0, 0, 2π, their variance is 8.77; while, their consines are 1, 1, 1 respectively, the variance reach to the minimum 0. Moreover, cosine similarity cannot represent the centrality for high-dimensional data.

Thanks for your explanation.

@ShuaiLYU
Copy link
Author

ShuaiLYU commented Dec 8, 2022

Cosine similarity can be used in place of the angle when all angles are smaller than π in 2D space, since cos(x) is monotonically decreasing when x is smaller than π, that means the consistency of angles is equivalent to the cosine. However, when the largest angle is larger than π, it will be invalid. For example, three angles 0, 0, 2π, their variance is 8.77; while, their consines are 1, 1, 1 respectively, the variance reach to the minimum 0. Moreover, cosine similarity cannot represent the centrality for high-dimensional data.

I was wondering if you plan to provide a python implementation of the high-Dim angle calculation algorithm? looking forward to it

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