perplexity | R Documentation |
Perplexity is a statistical measure of how well a probability model can predict new data. Lower perplexity indicates a better model.
perplexity(
x,
celdaMod,
useAssay = "counts",
altExpName = "featureSubset",
newCounts = NULL
)
## S4 method for signature 'SingleCellExperiment,ANY'
perplexity(
x,
useAssay = "counts",
altExpName = "featureSubset",
newCounts = NULL
)
## S4 method for signature 'ANY,celda_CG'
perplexity(x, celdaMod, newCounts = NULL)
## S4 method for signature 'ANY,celda_C'
perplexity(x, celdaMod, newCounts = NULL)
## S4 method for signature 'ANY,celda_G'
perplexity(x, celdaMod, newCounts = NULL)
x |
Can be one of
|
celdaMod |
Celda model object. Only works if |
useAssay |
A string specifying which assay
slot to use if |
altExpName |
The name for the altExp slot to use. Default "featureSubset". |
newCounts |
A new counts matrix used to calculate perplexity. If NULL,
perplexity will be calculated for the matrix in |
Numeric. The perplexity for the provided x
(and
celdaModel
).
data(sceCeldaCG)
perplexity <- perplexity(sceCeldaCG)
data(celdaCGSim, celdaCGMod)
perplexity <- perplexity(celdaCGSim$counts, celdaCGMod)
data(celdaCSim, celdaCMod)
perplexity <- perplexity(celdaCSim$counts, celdaCMod)
data(celdaGSim, celdaGMod)
perplexity <- perplexity(celdaGSim$counts, celdaGMod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.