resamplePerplexity | R Documentation |
Calculates the perplexity of each model's cluster assignments given the provided countMatrix, as well as resamplings of that count matrix, providing a distribution of perplexities and a better sense of the quality of a given K/L choice.
resamplePerplexity(
x,
celdaList,
useAssay = "counts",
altExpName = "featureSubset",
doResampling = FALSE,
numResample = 5,
seed = 12345
)
## S4 method for signature 'SingleCellExperiment'
resamplePerplexity(
x,
useAssay = "counts",
altExpName = "featureSubset",
doResampling = FALSE,
numResample = 5,
seed = 12345
)
## S4 method for signature 'ANY'
resamplePerplexity(
x,
celdaList,
doResampling = FALSE,
numResample = 5,
seed = 12345
)
x |
A numeric matrix of counts or a
SingleCellExperiment returned from celdaGridSearch
with the matrix located in the assay slot under |
celdaList |
Object of class 'celdaList'. Used only if |
useAssay |
A string specifying which assay
slot to use if |
altExpName |
The name for the altExp slot to use. Default "featureSubset". |
doResampling |
Boolean. If |
numResample |
Integer. The number of times to resample the counts matrix
for evaluating perplexity if |
seed |
Integer. Passed to with_seed. For reproducibility,
a default value of |
A SingleCellExperiment object or
celdaList
object with a perplexity
property, detailing the perplexity of all K/L combinations that appeared in
the celdaList's models.
data(sceCeldaCGGridSearch)
sce <- resamplePerplexity(sceCeldaCGGridSearch)
plotGridSearchPerplexity(sce)
data(celdaCGSim, celdaCGGridSearchRes)
celdaCGGridSearchRes <- resamplePerplexity(
celdaCGSim$counts,
celdaCGGridSearchRes
)
plotGridSearchPerplexity(celdaCGGridSearchRes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.