f(wi,wj,w^k)=p(i∣k):주변단어가k일때중심단어가i일확률p(j∣k):주변단어가k일때중심단어가j일확률f(w_i,w_j,\hat w_k)=\frac{p(i|k):주변단어가 k일때 중심단어가i일 확률}{p(j|k):주변단어가 k일때 중심단어가j일 확률}f(wi,wj,w^k)=p(j∣k):주변단어가k일때중심단어가j일확률p(i∣k):주변단어가k일때중심단어가i일확률 f1((wi−wj),w^k)=p(i∣k)p(j∣k)f_1((w_i-w_j),\hat w_k)=\frac{p(i|k)}{p(j|k)}f1((wi−wj),w^k)=p(j∣k)p(i∣k) f2((wi)Tw^k)(wj)Tw^k)=p(i∣k)p(j∣k)f_2(\frac{(w_i)^T\hat w_k)}{(w_j)^T\hat w_k)}=\frac{p(i|k)}{p(j|k)}f2((wj)Tw^k)(wi)Tw^k)=p(j∣k)p(i∣k) if f2(x):=exp(x)f_2(x) := exp(x)f2(x):=exp(x) wiTw^k=logp(i∣k)w_i^T\hat w_k=logp(i|k)wiTw^k=logp(i∣k)
wiTw^k=logp(i∣k)=log(XikXi)=logXik−logXiw_i^T\hat w_k =logp(i|k) = log(\frac{X_{ik}}{X_i})=logX_{ik}-logX_iwiTw^k=logp(i∣k)=log(XiXik)=logXik−logXi 위의 식이 교환법칙이 성립하지 않으므로, bias를 더해주어야 한다. wiTw^k+bi+b^k=logXikw_i^T\hat w_k + b_i+\hat b_k =logX_{ik}wiTw^k+bi+b^k=logXik
문제 : (1) logXiklogX_{ik}logXik값의 발산
from sklearn.decomposition import PCA pca = PCA(n_component = 2) pcafit = pca.fit_transform(word_vec_list)