summary.poisson_nmf_fit {fastTopics} | R Documentation |
Summarize Poisson NMF or Multinomial Topic Model Fit
Description
summary
method for the “poisson_nmf_fit”
and “multinom_topic_model_fit” classes.
Usage
## S3 method for class 'poisson_nmf_fit'
summary(object, ...)
## S3 method for class 'multinom_topic_model_fit'
summary(object, ...)
## S3 method for class 'summary.poisson_nmf_fit'
print(x, show.mixprops = FALSE, show.topic.reps = FALSE, ...)
## S3 method for class 'summary.multinom_topic_model_fit'
print(
x,
show.size.factors = FALSE,
show.mixprops = FALSE,
show.topic.reps = FALSE,
...
)
Arguments
object |
An object of class “poisson_nmf_fit” or
“multinom_topic_model_fit”. The former is usually the result
of calling |
... |
Additional arguments passed to the generic |
x |
An object of class “summary.poisson_nmf_fit”,
usually a result of a call to |
show.mixprops |
If |
show.topic.reps |
If |
show.size.factors |
If |
Value
The functions summary.poisson_nmf_fit
and
summary.multinom_topic_model_fit
compute and return a list
of statistics summarizing the model fit. The returned list
includes some or all of the following elements:
n |
The number of rows in the counts matrix, typically the number of samples. |
m |
The number of columns in the counts matrix, typically the number of observed counts per sample. |
k |
The rank of the Poisson NMF or the number of topics. |
s |
A vector of length n giving the "size factor" estimates; these estimates should be equal, or close to, the total counts in each row of the counts matrix. |
numiter |
The number of loadings and/or factor updates performed. |
loglik |
The Poisson NMF log-likelihood. |
loglik.multinom |
The multinomial topic model log-likelihood. |
dev |
The Poisson NMF deviance. |
res |
The maximum residual of the Karush-Kuhn-Tucker (KKT) first-order optimality conditions. This can be used to assess convergence of the updates to a (local) solution. |
mixprops |
Matrix giving a high-level summary of the mixture proportions, in which rows correspond to topics, and columns are ranges of mixture proportionss. |
topic.reps |
A matrix in which the ith row gives the mixture proportions for the sample "most representative" of topic i; by "most representative", we mean the row (or sample) with the highest proportion of counts drawn from the topic i. |