mbo_tramnet {tramnet}R Documentation

Model based optimization for regularized transformation models

Description

Uses model based optimization to find the optimal tuning parameter(s) in a regularized transformation model based on cross-validated log-likelihoods. Here the tramnet package makes use of the mlrMBO interface for Bayesian Optimization in machine learning problems to maximize the cv-logLik as a black-box function of the tuning parameters alpha and lambda.

Usage

mbo_tramnet(object, fold = 2, n_design = 5, n_iter = 5,
  minlambda = 0, maxlambda = 16, minalpha = 0, maxalpha = 1,
  folds = NULL, learner = "regr.km", pred.type = "se",
  opt_crit = makeMBOInfillCritEI(), noisy = FALSE,
  obj_type = c("lasso", "ridge", "elnet"), verbose = TRUE, ...)

Arguments

object

object of class tramnet

fold

fold for cross validation

n_design

results in n_design times the number of tuning parameters rows for the initial design matrix based on a random latin hypercube design

n_iter

number of iterations in the model based optimization procedure

minlambda

minimum value for lambda (default: 0)

maxlambda

maximum value for lambda (default: 16)

minalpha

minimum value for alpha (default: 0)

maxalpha

maximum value for alpha (default: 1)

folds

self specified folds for cross validation (mainly for reproducibility and comparability purposes)

learner

type of leaner used for the optimization (default: "regr.km")

pred.type

prediction type of the learner (default: "se")

opt_crit

optimization criterion, default: expected improvement

noisy

indicates whether folds for k-fold cross-validation should be random for each iteration, leading to a noisy objective function (default: FALSE)

obj_type

objective type, one of "lasso", "ridge" or "elnet"

verbose

toggle for a verbose output (default: TRUE)

...

additional arguments are ignored

Value

returns an object of class "MBOSingleObjResult" which is documented in mbo

Examples


set.seed(24101968)
data("Prostate", package = "lasso2")
x <- scale(model.matrix(lpsa ~ . - 1, data = Prostate))
y <- Prostate$lpsa
m0 <- BoxCox(lpsa ~ 1, data = Prostate)
mt <- tramnet(m0, x = x, lambda = 0, alpha = 1, check_dcp = FALSE)
(run_lasso <- mbo_tramnet(object = mt, n_design = 2, n_iter = 2,
                          obj_type = "lasso"))


[Package tramnet version 0.0-5 Index]