Skip to content

Commit

Permalink
kb autocommit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Apr 3, 2024
1 parent 544570e commit 5898fee
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions content/posts/KBhword2vec.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,24 @@ For the right part, by the chain rule:
&= \frac{\sum\_{x\_{j}}^{}\exp \qty(u\_{x} \cdot v\_{c}) u\_{x}}{\sum\_{w\_{j}}^{} \exp \qty(u\_{w} \cdot v\_{c})}
\end{align}

Combining this whole thing, we have:

\begin{equation}
\pdv{\log p(o|c)}{v\_{c}} = u\_{0} - \frac{\sum\_{x\_{j}}^{}\exp \qty(u\_{x} \cdot v\_{c}) u\_{x}}{\sum\_{w\_{j}}^{} \exp \qty(u\_{w} \cdot v\_{c})}
\end{equation}

Rewriting this slightly:

\begin{equation}
\pdv{\log p(o|c)}{v\_{c}} = u\_{0} - \sum\_{x\_{j}}^{}\frac{\exp \qty(u\_{x} \cdot v\_{c}) }{\sum\_{w\_{j}}^{} \exp \qty(u\_{w} \cdot v\_{c})} u\_{x}
\end{equation}

Meaning:

\begin{equation}
\pdv{\log p(o|c)}{v\_{c}} = u\_{0} - \sum\_{x\_{j}}^{}\frac{\exp \qty(u\_{x} \cdot v\_{c}) }{\sum\_{w\_{j}}^{} \exp \qty(u\_{w} \cdot v\_{c})} u\_{x}
\end{equation}


## properties {#properties}

Expand Down

0 comments on commit 5898fee

Please sign in to comment.