View source: R/function_plotConvergence.R
ggplot_convergence | R Documentation |
The "ggplot_convergence" function uses ggplot2 and reshape2 to visualize the decrease of the loss-function after a model has been trained.
ggplot_convergence( DTD.model, X.matrix = NA, test.data = NULL, estimate.c.type = "decide.on.model", title = "" )
DTD.model |
either a numeric vector with length of nrow(X), or a list
returned by |
X.matrix |
numeric matrix, with features/genes as rows, and cell types as column. Each column of X.matrix is a reference expression profile. A trained DTD model includes X.matrix, it has been trained on. Therefore, X.matrix should only be set, if the 'DTD.model' is not a DTD model. |
test.data |
list, with two entries, a numeric matrix each,
named 'mixtures' and 'quantities' For examples see |
estimate.c.type |
string, either "non_negative", or "direct". Indicates how the algorithm finds the solution of arg min_C ||diag(g)(Y - XC)||_2.
|
title |
string, additionally title |
As input parameter it needs the output of
train_deconvolution_model
, an DTD cross validation object,
or the output of an FISTA optimization run.
If the ‘DTD.model' includes a ’History' entry, and a 'test.data' is available
the loss function can be evaluated for each intermediate steps of the
optimization. Then, the resulting picture includes two convergence paths,
one for the training data, and one for the test.data.
For an example see section "Visualization of learn curve" in the package
vignette 'browseVignettes("DTD")'
ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.