2 hours ago · Science · hide · 0 comments

The previous post looked at how to interpret cosine similarity, or equivalently angles between word vectors. In a high-dimensional space, randomly chosen vectors are likely nearly perpendicular, and so relatively large angles, such as 50°, indicate very closely related words. Another way to look at this, as explained in the previous post, is that in high dimensions, a spherical cap of angular radius θ represents a small portion of a sphere, even for moderately large θ. The proportion of the area inside the spherical cap, given here, involves the “incomplete beta function” and so it’s hard to have an intuition for the value. For large dimension n, the approximation n−1/2 sinn − 1(θ) gives the proportion of the area inside the cap to within an order of magnitude. It’s easy to see that this function goes to zero quickly as n increases, provided |θ| < π/2. If you have the cosine similarity c = cos θ rather than θ itself, the approximation becomes n−1/2 (1 − c²)(n − 1)/2. Python script…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.