Skip to content

Commit

Permalink
help js
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasRieger committed May 15, 2020
1 parent 347734b commit 77e3625
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions R/jsTopics.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
#' @details
#' The Jensen-Shannon Similarity for two topics \eqn{\bm z_{i}} and
#' \eqn{\bm z_{j}} is calculated by
#' \deqn{\text{JS}(\bm z_{i}, \bm z_{j}) = 1 - \left( \text{KLD}(p_i, (p_i+p_j)/2) + \text{KLD}((p_j, (p_i+p_j)/2)) \right)/2 }
#'
#' with \eqn{V} is the vocabulary size and \eqn{n_k^{(v)}} is the count of
#' assignments of the \eqn{v}-th word to the \eqn{k}-th topic.
#' \deqn{JS(\bm z_{i}, \bm z_{j}) = 1 - \left( KLD(p_i, (p_i+p_j)/2) + KLD((p_j, (p_i+p_j)/2)) \right)/2}
#' \deqn{= 1 - \left( KLD(p_i, p_i+p_j) + KLD((p_j, p_i+p_j)) \right)/2 - \log(2)}
#' with \eqn{V} is the vocabulary size, \eqn{p_k = (p_k^{(1)}, ..., p_k^{(V)})},
#' and \eqn{p_k^{(v)}} is the proportion of assignments of the
#' \eqn{v}-th word to the \eqn{k}-th topic. KLD defines the Kullback-Leibler
#' Divergence calculated by
#' \deqn{KLD(\bm p_{k}, \bm p_{\Sigma}) = \sum_{v=1}^{V} p_k^{(v)} \log{\frac{p_k^{(v)}}{p_{\Sigma}^{(v)}}}.}
#'
#' @family TopicSimilarity functions
#'
Expand Down
11 changes: 7 additions & 4 deletions man/jsTopics.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 77e3625

Please sign in to comment.