perplexity.celda_C: Calculate the perplexity on new data with a celda_C model

Description Usage Arguments Value See Also Examples

View source: R/celda_C.R

Description

Perplexity is a statistical measure of how well a probability model can predict new data. Lower perplexity indicates a better model.

Usage

1
2
## S3 method for class 'celda_C'
perplexity(counts, celda.mod, new.counts = NULL)

Arguments

counts

Integer matrix. Rows represent features and columns represent cells. This matrix should be the same as the one used to generate 'celda.mod'.

celda.mod

Celda object of class "celda_C"

new.counts

A new counts matrix used to calculate perplexity. If NULL, perplexity will be calculated for the 'counts' matrix. Default NULL.

Value

Numeric. The perplexity for the provided count data and model.

See Also

'celda_C()' for clustering cells

Examples

1

compbiomed/celda documentation built on May 25, 2019, 3:58 a.m.