R/plot.cv_corrected_lasso.R

Defines functions plot.cv_corrected_lasso

Documented in plot.cv_corrected_lasso

#' @title plot.cv_corrected_lasso
#' @description Plot the output of \code{\link{cv_corrected_lasso}}.
#' @param x The object to be plotted, returned from \code{\link{cv_corrected_lasso}}.
#' @param ... Other arguments to plot (not used).
#' @export
plot.cv_corrected_lasso <- function(x, ...) {


  ggplot2::ggplot(x$cv,
                  ggplot2::aes(x = .data$radii, y = .data$mean_loss,
                                ymin = .data$lower_1se, ymax = .data$upper_1se)) +
    ggplot2::geom_point() +
    ggplot2::geom_errorbar(color = "gray") +
    ggplot2::labs(x = "Radius", y = "Loss", title = "Cross-validation plot for corrected lasso")
}

Try the hdme package in your browser

Any scripts or data that you put into this service are public.

hdme documentation built on May 31, 2023, 5:44 p.m.