Word Embeddings Flashcards
1
Q
TF-IDF
A
term frequency - inverse document frequency
tf-idf(t, d, D) = tf(f,d) * idf(t,D)
tf-idf(t, d, D) = f_{t,d} * log(|D| / |{d \in D: t \in d}|)
2
Q
Continuous Bag-of-Words (CBOW)
A
Predicts target word w_t from context words:
w_{t-j} … w_{t-2} w_{t-1} ? w_{t+1} w_{t+2} … w_{t+j}
3
Q
Skip-gram model
A
Predicts context words from the target word
? ? ? w_t ? ? ?
4
Q
Skip-gram model target function
A
1/T \sum_t \sum_{-c < j < c} log(p(w_{t+j} | w_t; \theta))
find argmax \theta (learned embedding vector)
5
Q
softmax (NLP context)
A
p(w_{t+j} | w_t) = exp(dot(v’w{t+j}, v_w_t)) / \sum_{w’=1}^W exp(dot(v’_w’, v_w_t))
v'_w_{t+j} = vector presentation of the context word v_w_t = vector representation of the input word