make_cvscore_plot: Generate cross-validation score path plot.

Description Usage Arguments Value

View source: R/reg_plots.R

Description

Generate cross-validation score path plot.

Usage

1
make_cvscore_plot(cvscore_df, score_name, best_lambda, style = "base")

Arguments

cvscore_df

A data frame with 2 columns: cvscore, lambda.

score_name

A string identifying the type of score used, e.g., "MSE" for mean square error.

best_lambda

A scalar for the lambda value at which the cv score is lowest. For plotting a vertical line for the selected coefficient values.

style

A character scalar. Possible values are c("base", "clean"). "base" returns a ggplot object using the base (gray) theme. "clean" returns a ggplot object using theme_few. Default is "base".

Value

A ggplot object.


atredennick/modselr documentation built on Dec. 11, 2020, 10:09 p.m.