summary method for the “poisson_nmf_fit” and “multinom_topic_model_fit” classes.

# S3 method for poisson_nmf_fit
summary(object, ...)

# S3 method for multinom_topic_model_fit
summary(object, ...)

# S3 method for summary.poisson_nmf_fit
print(x, show.mixprops = FALSE, show.topic.reps = FALSE, ...)

# S3 method for 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 fit_poisson_nmf; the latter is usually the result of calling fit_topic_model or poisson2multinom.

...

Additional arguments passed to the generic summary or print.summary method.

x

An object of class “summary.poisson_nmf_fit”, usually a result of a call to summary.poisson_nmf_fit.

show.mixprops

If TRUE, print a summary of the mixture proportions.

show.topic.reps

If TRUE, print a summary of the topic representatives.

show.size.factors

If TRUE, print a summary of the size factors.

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.