Outputs from function SpaTopic_inference.
A list contains the following members:
$Perplexity. The perplexity is for the training data.
Let N be the total number of cells across all images.
\(Perplexity = exp(-loglikelihood/N)\)
$Deviance. \(Deviance = -2loglikelihood\).
$loglikelihood. The model log-likelihood.
$loglike.trace. The log-likelihood for every collected posterior sample.
NULL if trace = FALSE.
$DIC. Deviance Information Criterion. NULL if trace = FALSE.
$Beta. Topic content matrix with rows as celltypes and columns as topics
$Theta. Topic prevalent matrix with rows as regions and columns as topics
$Ndk. Number of cells per topic (col) per region (row).
$Nwk. Number of cells per topic (col) per celltype (row).
$Z.trace. Number of times cell being assigned to each topic across all posterior samples.
We can further compute the posterior distributions of Z (topic assignment) for
individual cells.
$doc.trace. Ndk for every collected posterior sample.
NULL if trace = FALSE.
$word.trace. Nwk for every collected posterior sample.
NULL if trace = FALSE.
$cell_topics. Final topic assignments Z for individual cells.
$parameters. Model parameters used in the analysis.
SpaTopic_inference