perplexity: Calculate the perplexity from a single celda model

Description Usage Arguments Value Examples

View source: R/model_performance.R

Description

Perplexity can be seen as a measure of how well a provided set of cluster assignments fit the data being clustered.

Usage

1
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", "celda_G" or "celda_CG".

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.

Examples

1

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