Vector embeddings: Difference between revisions

No edit summary
Line 32: Line 32:
A basic set of vector embeddings (limited to 5 dimensions) for the objects and the search term might appear as follows:
A basic set of vector embeddings (limited to 5 dimensions) for the objects and the search term might appear as follows:


Word Vector embedding
{| class="wikitable"
kitty [1.5, -0.4, 7.2, 19.6, 20.2]
! Word !! Vector Embedding
puppy [1.7, -0.3, 6.9, 19.1, 21.1]
|-
orange [-5.2, 3.1, 0.2, 8.1, 3.5]
| kitty || [1.5, -0.4, 7.2, 19.6, 20.2]
blueberry [-4.9, 3.6, 0.9, 7.8, 3.6]
|-
strcuture [60.1, -60.3, 10, -12.3, 9.2]
| puppy || [1.7, -0.3, 6.9, 19.1, 21.1]
motorbike [81.6, -72.1, 16, -20.2, 102]
|-
Q: fruit [-5.1, 2.9, 0.8, 7.9, 3.1]
| orange || [-5.2, 3.1, 0.2, 8.1, 3.5]
|-
| blueberry || [-4.9, 3.6, 0.9, 7.8, 3.6]
|-
| strcuture || [60.1, -60.3, 10, -12.3, 9.2]
|-
| motorbike || [81.6, -72.1, 16, -20.2, 102]
|-
| fruit || [-5.1, 2.9, 0.8, 7.9, 3.1]
|}


Upon examining each of the 5 components of the vectors, it's evident that kitty and puppy are much closer than puppy and orange (we don't even have to determine the distances). Similarly, fruit is significantly closer to orange and blueberry compared to the other words, making them the top results for the "fruit" search.
Upon examining each of the 5 components of the vectors, it's evident that kitty and puppy are much closer than puppy and orange (we don't even have to determine the distances). Similarly, fruit is significantly closer to orange and blueberry compared to the other words, making them the top results for the "fruit" search.
370

edits