getTopics {ldaPrototype} | R Documentation |
Getter for LDA
Description
Returns the corresponding element of a LDA
object.
getEstimators
computes the estimators for phi
and theta
.
Usage
getTopics(x)
getAssignments(x)
getDocument_sums(x)
getDocument_expects(x)
getLog.likelihoods(x)
getParam(x)
getK(x)
getAlpha(x)
getEta(x)
getNum.iterations(x)
getEstimators(x)
Arguments
x |
[ |
Details
The estimators for phi
and theta
in
w_n^{(m)} \mid T_n^{(m)}, \bm\phi_k \sim \textsf{Discrete}(\bm\phi_k),
\bm\phi_k \sim \textsf{Dirichlet}(\eta),
T_n^{(m)} \mid \bm\theta_m \sim \textsf{Discrete}(\bm\theta_m),
\bm\theta_m \sim \textsf{Dirichlet}(\alpha)
are calculated referring to Griffiths and Steyvers (2004) by
\hat{\phi}_{k, v} = \frac{n_k^{(v)} + \eta}{n_k + V \eta},
\hat{\theta}_{m, k} = \frac{n_k^{(m)} + \alpha}{N^{(m)} + K \alpha}
with V
is the vocabulary size, K
is the number of modeled topics;
n_k^{(v)}
is the count of assignments of the v
-th word to
the k
-th topic. Analogously, n_k^{(m)}
is the count of assignments
of the m
-th text to the k
-th topic. N^{(m)}
is the total
number of assigned tokens in text m
and n_k
the total number of
assigned tokens to topic k
.
References
Griffiths, Thomas L. and Mark Steyvers (2004). "Finding scientific topics". In: Proceedings of the National Academy of Sciences 101 (suppl 1), pp.5228–5235, doi: 10.1073/pnas.0307752101.
See Also
Other getter functions:
getJob()
,
getSCLOP()
,
getSimilarity()
Other LDA functions:
LDABatch()
,
LDARep()
,
LDA()