Home | Trees | Indices | Help |
|
---|
|
object --+ | Distribution --+ | LDA
Abstract base class.
Instance Methods | |||
|
|||
float
|
|
||
list
|
|
||
tuple
|
|
||
Inherited from |
Method Details |
Estimate lower bound, $\mathcal{L}(\boldsymbol{\lambda})$, for the given set of documents.
|
Samples a specified number of documents from the model. Topics ($\boldsymbol{\beta}$) are first sampled from the current
Dirichlet beliefs over topics. This is done only once per call to
Words are represented as tuples of a word ID and a word count. All
generated word counts will be 1, but words can occur multiple times in a
document, e.g.,
|
Computes beliefs over topic assignments ($z_{di}$) for the given documents. The beliefs may be estimated via mean-field variational inference
('VI') or collapsed Gibbs sampling ('GIBBS'). For $N$ documents, the
method returns a tuple of a $K \times N$-dimensional matrix and a $W
\times K$-dimensional matrix of sufficient statistics. In case of
variational inference, each column vector of the $K \times N$ matrix
represents Dirichlet beliefs over the distribution of topics
($\boldsymbol{\theta}$) while for Gibbs sampling it represents a sample
of $\boldsymbol{\theta}$ conditioned on the sampled topic assignments
$\mathbf{z}$. This can be used to initialize the algorithm in a later
call to Each document should be represented as a list of words, where each word is a tuple of a word ID and a word count.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun May 24 18:19:15 2015 | http://epydoc.sourceforge.net |