Skip to contents

Given a NMF reduction at multiple ranks, plot rank vs. test set reconstruction error to determine the optimal rank.

S3 method for Seurat that runs the singlet::RunNMF function.

Usage

# S3 method for Seurat
RankPlot(object, reduction = "nmf")

RankPlot(object, reduction = "nmf")

Arguments

object

a Seurat object or a data.frame that is the result of RunNMF

reduction

name of the NMF reduction in the Seurat object (result of RunNMF) for which multiple ranks were computed.

Value

A ggplot2 object