prof_alpha: Profiling tuning parameters

View source: R/prof_lambda.R

prof_alphaR Documentation

Profiling tuning parameters

Description

Computes the regularization path of all coefficients for a single tuning, alpha, parameter over a sequence of values.

Usage

prof_alpha(model, min_alpha = 0, max_alpha = 1, nprof = 5,
  as.lm = FALSE)

Arguments

model

model of class tramnet

min_alpha

minimal value of alpha (default = 0)

max_alpha

maximal value of alpha (default = 15)

nprof

number of profiling steps (default = 5)

as.lm

return scaled coefficients for class "tramnet_Lm"

Value

Object of class "prof_alpha" which contains the regularization path of all coefficients and the log-likelihood over the mixing parameter alpha

Author(s)

Lucas Kook

Examples


library("tramnet")

if (require("survival") & require("penalized")) {
  data("nki70", package = "penalized")
  nki70$resp <- with(nki70, Surv(time, event))
  x <- scale(model.matrix( ~ 0 + DIAPH3 + NUSAP1 + TSPYL5 + C20orf46, data = nki70))
  y <- Coxph(resp ~ 1, data = nki70, order = 10, log_first = TRUE)
  fit <- tramnet(y, x, lambda = 1, alpha = 1)
  pfa <- prof_alpha(fit)
  plot_path(pfa)
}


tramnet documentation built on April 1, 2023, 12:20 a.m.