canyon.plot: Visualize results from an NMF cross-validation experiment

Description Usage Arguments Details Value See Also

View source: R/canyon_plot.R

Description

Renders a ggplot2 object given output from nnmf.cv

Usage

1
2
3
4
5
6
7
8
9
canyon.plot(
  nnmf.cv,
  ribbon = "fit",
  points = FALSE,
  ribbon.collapse = TRUE,
  line.collapse = FALSE,
  ribbon.confidence = ifelse(ribbon == "fit", 0.95, 1),
  title = "Canyon Plot"
)

Arguments

nnmf.cv

The result from nnmf.cv

ribbon

either "none", "fit" (default), or "sd". "fit" (default) plots a polynomial fit confidence interval with the loess method, "sd" plots one standard deviation channel based on individual factor angles.

points

boolean, whether to show jittered points for the cosine angle of each factor pair (default is FALSE)

ribbon.collapse

Whether to collapse multiple ribbons into a single layer (default is TRUE). Ribbons will be collapsed if lines are collapsed.

line.collapse

Whether to collapse multiple lines into a single layer (default is FALSE)

ribbon.confidence

Confidence interval for a ribbon, either a multiple of the standard deviation or a confidence range for fit (default 0.95 for ribbon = "fit", 1.0 for ribbon = "sd")

title

plot ggtitle

Details

Find the optimal rank by running scNMF::nnmf.cv() and then using canyon.plot to generate a plot from the nnmf.cv result using ggplot2 Any ggplot2 grammer can be applied to the returned ggplot2 object

Value

A ggplot2 object

See Also

nnmf.cv


zdebruine/scNMF documentation built on Jan. 1, 2021, 1:50 p.m.