fit_multinom_model {fastTopics} | R Documentation |
Fit Simple Multinomial Model
Description
Fit a simple multinomial model for count data, in
which each sample (i.e., a row of the data matrix X
)
is assigned to a cluster. Under this simple multinomial model,
x_{ij}
assigned to cluster k
is multinomial with sample
size s_i = x_{i1} + ... + x_{im}
and multinomial
probabilities p_{1k}, ..., p_{mk}
. This is a special case of
the multinomial topic model in which all the mixture proportions
are either 0 or 1. The maximum-likelihood estimates (MLEs) of the
multinomial probabilities have a closed-form solution; no
iterative algorithm is needed to fit this simple model.
Usage
fit_multinom_model(cluster, X, verbose = c("none", "detailed"), ...)
Arguments
cluster |
A factor specifying a grouping, or clustering, of
the rows of |
X |
The n x m matrix of counts; all entries of X should be
non-negative. It can be a sparse matrix (class |
verbose |
This is passed as the “verbose” argument in
the call to |
... |
Additional arguments passed to
|
Value
A multinomial topic model fit.