Step-by-step answer
Stretch 45 min6 stepsProbe embedding geometry
GloVe 6B 100-d vectors cached as a numpy array, with cosine neighbours and b − a + c analogies over seven relation types, each scored with and without excluding the input words. Excluding the inputs is worth 30–50 points of accuracy on most relations, because the target vector is usually still closest to one of the words you started from.
Back to the exercise