lda.collapsed.gibbs.sampler(documents, K, vocab, num.iterations, alpha,
eta, initial = NULL, burnin = NULL, compute.log.likelihood = FALSE)slda.em(documents, K, vocab, num.e.iterations, num.m.iterations, alpha, eta, annotations, params, variance, logistic = FALSE, lambda = 10, method = "sLDA")
mmsb.collapsed.gibbs.sampler(network, K, num.iterations, alpha, beta.prior, initial = NULL, burnin = NULL)
mmsb.collapsed.gibbs.sampler
, a $D \times D$
matrix (coercible as logical) representing the adjacency matrix for
the network. Note that elements on the diagonal are ignored.slda.em
, the number of Gibbs sampling sweeps to make over
the entire corpus for each iteration of EM.slda.em
, the number of EM iterations to make.mmsb.collapsed.gibbs.sampler
, the the beta hyperparameter
for each entry of the block relations matrix. This parameter should
be a length-2 list whose entries are $K \times K$ matrices. The
elements of the two matrices comprlda.collapsed.gibbs.sampler
and mmsb.collapsed.gibbs.sampler
. If this parameter is non-NULL, it
will also have the TRUE
will cause the sampler to
compute the log likelihood of the words (to within a constant
factor) after each sweep over the variables. The log likelihood for each
iteration is stored in the log.likelslda.em
which models documents along
with numeric annotations associated with each document.slda.em
, a length K numeric vector of regression
coefficients at which the EM algorithm should be initialized.slda.em
, the variance associated with the Gaussian
response modeling the annotations in annotations.slda.em
, a scalar logical which, when TRUE
, causes
the annoatations to be modeled using a logistic response instead of a
Gaussian (the covariates will be coerced as logicals).slda.em
, a character indicating how to model the
annotations. Only "sLDA"
, the stock model given in the
references, is officially supported at the moment.assignments[[i]]
is an integer vector of the same length as the
number of columns in documents[[i]]
indicating the topic
assignment for each word.lda.collapsed.gibbs.sampler
. A
length num.iterations
vector of log likelihoods when the flag
compute.log.likelihood
is set to TRUE
.mmsb.collapsed.gibbs.sampler
. A $D \times D$ integer matrix of
topic assignments for the source document corresponding to the link
between one document (row) and another (column).mmsb.collapsed.gibbs.sampler
. A $D \times D$ integer matrix of
topic assignments for the destination document corresponding to the link
between one document (row) and another (column).mmsb.collapsed.gibbs.sampler
. A $K \times K$ integer
matrix indicating the number of times the source of a non-link was
assigned to a topic (row) and the destination was assigned to
another (column).mmsb.collapsed.gibbs.sampler
. A $K \times K$ integer
matrix indicating the number of times the source of a link was
assigned to a topic (row) and the destination was assigned to
another (column).slda.em
, a model of type lm
,
the regression
model fitted to the annotations.slda.em
, a length K numeric vector of
coefficients for the regression model.Airoldi , Edoardo M. and Blei, David M. and Fienberg, Stephen E. and Xing, Eric P. Mixed Membership Stochastic Blockmodels. Journal of Machine Learning Research, 2008.
Blei, David M. and McAuliffe, John. Supervised topic models. Advances in Neural Information Processing Systems, 2008.
Griffiths, Thomas L. and Steyvers, Mark. Finding scientific topics. Proceedings of the National Academy of Sciences, 2004.
read.documents
and lexicalize
can be used
to generate the input data to these models. top.topic.words
and
predictive.distribution
for operations on the fitted models.
## See demos for the three functions:
demo(lda)
demo(slda)
demo(mmsb)
Run the code above in your browser using DataLab