정답입니다. 내적은 벡터의 코사인과 길이 모두에 비례합니다. 따라서 b와 c로 형성된 각도의 코사인이 b와 a로 형성된 각도의 코사인보다 높더라도 a의 벡터 길이가 더 길기 때문에 a와 b의 내적은 b와 c의 내적보다 큽니다.
코사인
코사인은 벡터 간의 각도에만 종속되며, 각도가 작을수록 \(\theta_{bc}\) \(\cos(\theta_{bc})\) 가 \(\cos(\theta_{ab})\)보다 커집니다.
유클리드 거리
거리 \(\vec{bc}\) 는 \(\vec{ab}\)보다 작으므로b는a보다c에 더 가깝습니다.
뮤직비디오의 유사성을 계산하고 있습니다. 뮤직비디오의 임베딩 벡터 길이는 인기도에 비례합니다. 코사인에서 내적으로 전환하여 유사성을 계산합니다. 뮤직비디오 간의 유사성은 어떻게 달라지나요?
인기 동영상은 일반적으로 모든 동영상과 더 유사해집니다.
내적은 두 벡터의 길이에 영향을 받으므로 인기 동영상의 벡터 길이가 길면 모든 동영상과 더 유사해집니다.
인기 동영상은 다른 인기 동영상과 더 유사해질 뿐입니다.
내적은 \(|a||b|\cos(\theta)\)로 계산됩니다.
a가 인기 있는 뮤직비디오라고 가정하면 삽입 길이 \(|a|\)가 인기 없는 동영상의 삽입 길이보다 큽니다.
길이가 클수록 \(|b|\)값과 관계없이 내적 값이 증가합니다. 따라서 인기 동영상은 다른 인기 동영상뿐만 아니라 다른 모든 동영상과 더 유사해집니다.
인기 동영상은 인기가 낮은 동영상보다 서로 유사성이 낮아집니다.
내적은 벡터 길이와 함께 증가하며 인기 동영상은 벡터 길이가 길기 때문에 유사도 측정값은 감소하지 않고 증가합니다.
변경사항 없음.
내적은 벡터 길이에 영향을 받습니다. 인기 동영상의 벡터 길이가 길면 (이전의 코사인) 유사도 측정값이 변경됩니다.
이전 질문과 동일한 설정을 사용하고 있다고 가정하고 내적에서 코사인으로 다시 전환한다고 가정해 보겠습니다. 뮤직비디오 간의 유사성은 어떻게 달라지나요?
인기 동영상은 모든 동영상과 유사성이 줄어듭니다.
코사인은 벡터 길이의 영향을 받지 않으므로 인기 동영상 임베딩의 긴 벡터 길이는 유사성에 기여하지 않습니다.
따라서 내적에서 코사인으로 전환하면 인기 동영상과 다른 모든 동영상 간의 유사성이 감소합니다.
인기 동영상은 모든 동영상과 더 유사해집니다.
코사인은 벡터 길이의 영향을 받지 않으므로 내적에서 전환하면 모든 인기 동영상의 유사성이 감소합니다.
인기 동영상은 서로 더 유사해집니다.
코사인은 벡터 길이의 영향을 받지 않으므로 내적에서 전환하면 모든 인기 동영상의 유사성이 감소합니다.
변경사항 없음.
코사인은 벡터 길이의 영향을 받지 않지만 내적은 영향을 받으므로 내적에서 코사인으로 전환하면 유사성이 달라집니다.
[null,null,["최종 업데이트: 2025-02-25(UTC)"],[[["\u003cp\u003eDot product considers both angle and magnitude of vectors, making vectors with larger magnitudes more similar despite the angle between them.\u003c/p\u003e\n"],["\u003cp\u003eCosine similarity only considers the angle between vectors, disregarding their magnitudes.\u003c/p\u003e\n"],["\u003cp\u003eSwitching from cosine to dot product for similarity calculation makes popular items (with larger vector magnitudes) more similar to all other items.\u003c/p\u003e\n"],["\u003cp\u003eSwitching back from dot product to cosine similarity normalizes the effect of magnitude, making popular items less biased towards similarity with all other items.\u003c/p\u003e\n"]]],[],null,["# Check your understanding\n\nIn the image above, if you want `b` to be more similar to `a` than to `c`, which measure should you pick? \nDot product \nCorrect! The dot product is proportional to both the cosine and the lengths of vectors. So even though the cosine is higher for the angle formed by `b` and `c` than for the angle formed by `b` and `a`, the greater vector length of `a` makes the dot product of `a` and `b` greater than the dot product of `b` and `c`. \nCosine \nThe cosine depends only on the angle between vectors, and the smaller angle \\\\(\\\\theta_{bc}\\\\) makes \\\\(\\\\cos(\\\\theta_{bc})\\\\) larger than \\\\(\\\\cos(\\\\theta_{ab})\\\\). \nEuclidean distance \nThe distance \\\\(\\\\vec{bc}\\\\) is smaller than \\\\(\\\\vec{ab}\\\\), leaving `b` closer to `c` than to `a`. \nYou are calculating similarity for music videos. The length of the embedding vectors of music videos is proportional to their popularity. You switch from cosine to dot product to calculate similarity. How does similarity between music videos change? \nPopular videos become **more similar** to all videos in general. \nSince the dot product is affected by the lengths of both vectors, the large vector length of popular videos will make them more similar to all videos. \nPopular videos only become **more similar** to other popular videos. \nRecall that the dot product is calculated as \\\\(\\|a\\|\\|b\\|\\\\cos(\\\\theta)\\\\). Assuming `a` is a popular music video, we know its embedding length, \\\\(\\|a\\|\\\\), is larger than that of unpopular videos. The larger length increases the dot product irrespective of the value of \\\\(\\|b\\|\\\\). Hence, popular videos become more similar to all other videos, not just other popular videos. \nPopular videos become **less similar** to each other than to less popular videos. \nSince dot product increases with vector length, and popular videos have high vector length, the similarity measure will increase, not decrease. \nNo change. \nDot product is affected by vector length. The high vector length of popular videos will change the (previously cosine) similarity measure. \nGiven the same setup as the previous question, suppose you switch back to cosine from dot product. How does similarity between music videos change? \nPopular videos become **less similar** to all videos. \nBecause cosine is not affected by vector length, the large vector length of popular video embeddings does not contribute to similarity. Thus, switching to cosine from dot product reduces the similarity between popular videos and all other videos. \nPopular videos become **more similar** to all videos. \nCosine is not affected by the vector lengths, so switching from dot product will cause the similarities for all popular videos to decrease. \nPopular videos become **more similar** only to each other. \nCosine is not affected by the vector lengths, so switching from dot product will cause the similarities for all popular videos to decrease. \nNo change. \nSince cosine is not affected by vector length, while dot product is, switching from dot product to cosine will change similarities."]]