perplexity {celda} | 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, ...) ## S4 method for signature 'SingleCellExperiment,ANY' perplexity( x, useAssay = "counts", altExpName = "featureSubset", newCounts = NULL ) ## S4 method for signature 'matrix,celda_CG' perplexity(x, celdaMod, newCounts = NULL) ## S4 method for signature 'matrix,celda_C' perplexity(x, celdaMod, newCounts = NULL) ## S4 method for signature 'matrix,celda_G' perplexity(x, celdaMod, newCounts = NULL)
x |
Can be one of
|
celdaMod |
Celda model object. Only works if |
... |
Ignored. Placeholder to prevent check warning. |
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)