A query vector can be scored against displayed word vectors by exact dot products. This lesson compares the integer scores and returns only the vector-label with the largest score.

highlighted = computed this step

A displayed query vector

Use the displayed query vector q=(3,1). It is scored against the same displayed word vectors: cat=(3,1), kitten=(2,1), and car=(1,3).

q=(3,1)q=(3,1)
Pick the Largest DotA displayed query vector is compared by exact dot score.Pick the Largest DotA displayed query vector is compared by exact dot score.query vector dot-score comparisonquery q=(3,1); dots recompute from displayed vectorstie-break: lexicographically smallest label among max dot scoresword vectordot with queryscorecat=(3,1)3·3 + 1·110kitten=(2,1)3·2 + 1·17car=(1,3)3·1 + 1·36largest exact dot: cat with 10output is a displayed vector-label choice only

Compute exact dot scores

The score for cat is 3 times 3 plus 1 times 1, which is 10. The same rule gives kitten score 7 and car score 6.

qcat=10,qkitten=7,qcar=6q\cdot\text{cat}=10,\quad q\cdot\text{kitten}=7,\quad q\cdot\text{car}=6
Pick the Largest DotA displayed query vector is compared by exact dot score.Pick the Largest DotA displayed query vector is compared by exact dot score.query vector dot-score comparisonquery q=(3,1); dots recompute from displayed vectorstie-break: lexicographically smallest label among max dot scoresword vectordot with queryscorecat=(3,1)3·3 + 1·110kitten=(2,1)3·2 + 1·17car=(1,3)3·1 + 1·36largest exact dot: cat with 10output is a displayed vector-label choice only

Pick the largest

Compare the exact scores: 10 is larger than 7 and 6, so the displayed choice is cat. That output is only a vector-label choice from this table.

argmax{10,7,6}=cat\operatorname{argmax}\{10,7,6\}=\text{cat}
Pick the Largest DotA displayed query vector is compared by exact dot score.Pick the Largest DotA displayed query vector is compared by exact dot score.query vector dot-score comparisonquery q=(3,1); dots recompute from displayed vectorstie-break: lexicographically smallest label among max dot scoresword vectordot with queryscorecat=(3,1)3·3 + 1·110kitten=(2,1)3·2 + 1·17car=(1,3)3·1 + 1·36largest exact dot: cat with 10output is a displayed vector-label choice only