ggplot_cv: Visualizing cross validation output

View source: R/function_plotCV.R

ggplot_cvR Documentation

Visualizing cross validation output

Description

Plot the regularization parameter lambda vs the resulting loss function value. The lambda with the minimal mean loss in cross validation is marked with a red dot. For an example see "Cross validation" in the package vignette 'browseVignettes("DTD")'

Usage

ggplot_cv(
  DTD.model,
  title = "",
  LAMBDA.TRANS.FUN = log2,
  upper.x.axis.info = "non-zero",
  x.lab = expression("log2(" * lambda * ")"),
  y.lab = "Loss function"
)

Arguments

DTD.model

: list as returned by train_deconvolution_model DTD_cv_lambda_R or DTD_cv_lambda_cxx

title

string, additionally title

LAMBDA.TRANS.FUN

function, will be applied to the lambda sequence, e.g. to get equidistance x ticks

upper.x.axis.info

string, either "non-zero" or "geometric-mean". Sets the information that will be printed on the upper x axis.

x.lab

string, used as x label on the plot

y.lab

string, used as y label on the plot

Value

a ggplot plot object


MarianSchoen/DTD documentation built on April 29, 2022, 1:59 p.m.