plot.TrainedOwl: Plot results from cross-validation

Description Usage Arguments Value See Also Examples

View source: R/plot.R

Description

Plot results from cross-validation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'TrainedOwl'
plot(
  x,
  measure = c("auto", "mse", "mae", "deviance", "auc", "misclass"),
  plot_min = TRUE,
  ci_alpha = 0.2,
  ci_border = FALSE,
  ci_col = lattice::trellis.par.get("superpose.line")$col,
  ...
)

Arguments

x

an object of class 'TrainedOwl', typically from a call to trainOwl()

measure

any of the measures used in the call to trainOwl(). If measure = "auto" then deviance will be used for binomial and multinomial models, whilst mean-squared error will be used for Gaussian and Poisson models.

plot_min

whether to mark the location of the penalty corresponding to the best prediction score

ci_alpha

alpha (opacity) for fill in confidence limits

ci_border

color (or flag to turn off and on) the border of the confidence limits

ci_col

color for border of confidence limits

...

other arguments that are passed on to lattice::xyplot()

Value

An object of class 'trellis' is returned and, if used interactively, will most likely have its print function lattice::print.trellis()) invoked, which draws the plot on the current display device.

See Also

trainOwl(), lattice::xyplot(), lattice::panel.xyplot()

Examples

1
2
3
4
5
6
7
# Cross-validation for a SLOPE binomial model
set.seed(123)
tune <- trainOwl(subset(mtcars, select = c("mpg", "drat", "wt")),
                 mtcars$hp,
                 q = c(0.1, 0.2),
                 number = 10)
plot(tune, ci_col = "salmon", col = "black")

jolars/prague documentation built on March 4, 2020, 7:13 p.m.