| plot_tune | R Documentation |
Produces a ggplot2 plot of R-squared/RMSE values generated by
tune_deconv().
plot_tune(
result,
group = "subclass",
xvar = colnames(result)[1],
fix = NULL,
metric = attr(result, "metric"),
title = NULL,
show_legend = nlevels(result$subclass) < 25,
errorbars = TRUE,
show_points = TRUE
)
result |
Dataframe of tuning results generated by |
group |
Character value specifying column in |
xvar |
Character value specifying column in |
fix |
Optional list specifying parameters to be fixed at specific values. |
metric |
Specifies tuning metric: either "RMSE", "Rsq", "pearson" or "resvar" (residual variance of bulk gene expression). |
title |
Character value for the plot title. |
show_legend |
Logical whether to show the legend when |
errorbars |
Logical whether to show error bars. |
show_points |
Logical whether to overlay points. |
If group is set to "subclass", then the tuning parameter specified by
xvar is varied on the x axis. Any other tuning parameters (i.e. if 2 or
more have been tuned) are fixed to their best tuned values.
If group is set to a different column than "subclass", then the mean
R-squared/RMSE values in result are averaged over subclasses. This makes it
easier to compare the overall effect (mean R-squared/RMSE) of 2 tuned
parameters which are specified by xvar and group. Any remaining
parameters not shown are fixed to their best tuned values.
If group is NULL, the tuning parameter specified by xvar is varied on
the x axis and R-squared/RMSE values are averaged over the whole grid to give
the generalised mean effect of varying the xvar parameter.
ggplot2 scatter plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.