cvrisk.boostrq {boostrq}R Documentation

Crossvalidation for boostrq

Description

Crossvalidation for boostrq

Usage

## S3 method for class 'boostrq'
cvrisk(
  object,
  folds = mboost::cv(object$weights, type = "kfold"),
  grid = 0:mstop(object),
  papply = parallel::mclapply,
  mc.preschedule = FALSE,
  fun = NULL,
  ...
)

Arguments

object

a boostrq object

folds

a matrix indicating the weights for the k resampling iterations

grid

a vetor of stopping parameters the empirical quantile risk is to be evaluated for.

papply

(parallel) apply function, defaults to mclapply. To run sequentially (i.e. not in parallel), one can use lapply.

mc.preschedule

preschedule tasks if are parallelized using mclapply (default: FALSE)? For details see mclapply.

fun

if fun is NULL, the out-of-sample risk is returned. fun, as a function of object, may extract any other characteristic of the cross-validated models. These are returned as is.

...

additional arguments passed to callies

Value

Cross-validated Boosting regression quantiles

Examples

boosted.rq <-
boostrq(
 formula = mpg ~ brq(cyl * hp) + brq(am + wt),
 data = mtcars,
 mstop = 200,
 nu = 0.1,
 tau = 0.5
)

set.seed(101)

cvk.out <-
cvrisk(
 boosted.rq,
 grid = 0:mstop(boosted.rq),
 folds = mboost::cv(boosted.rq$weights, type = "kfold", B = 5)
)

cvk.out

plot(cvk.out)

mstop(cvk.out)

boosted.rq[mstop(cvk.out)]


[Package boostrq version 1.0.0 Index]