optimalModel | R Documentation |
Get the optimal LDA model
optimalModel(models, opt)
models |
list returned from fitLDA |
opt |
either "kneed" (kOpt1) or "min" (kOpt2), or designate a specific K. "kneed" = K vs perplexity inflection point. "min" = K corresponding to minimum perplexity "proportion" = K vs number of cell-type with mean proportion < 5% inflection point |
optimal LDA model fitted to the K based on opt parameter
data(mOB)
pos <- mOB$pos
cd <- mOB$counts
counts <- cleanCounts(cd, min.lib.size = 100)
corpus <- restrictCorpus(counts, removeAbove=1.0, removeBelow = 0.05)
ldas <- fitLDA(t(as.matrix(corpus)), Ks = seq(2,4), ncores=2)
optLDA <- optimalModel(models = ldas, opt = "min")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.