get.ideal.penalty {logicDT}R Documentation

Tuning the LASSO regularization parameter

Description

This function takes a fitted linear.logic model and independent validation data as input for finding the ideal LASSO complexity penalty s.

Usage

get.ideal.penalty(
  model,
  X,
  y,
  Z = NULL,
  scoring_rule = "deviance",
  choose = "min"
)

Arguments

model

A fitted linear.logic model (i.e., a model created via fitLinearLogicModel or fitLinearBoostingModel)

X

Matrix or data frame of binary input data. This object should correspond to the binary matrix for fitting the model.

y

Response vector. 0-1 coding for binary outcomes.

Z

Optional quantitative covariables supplied as a matrix or data frame. Only used (and required) if the model was fitted using them.

scoring_rule

The scoring rule for evaluating the validation error and its standard error. For classification tasks, "deviance" or "Brier" should be used.

choose

Model selection scheme. If the model that minimizes the validation error should be chosen, choose = "min" should be set. Otherwise, choose = "1se" leads to simplest model in the range of one standard error of the minimizing model.

Value

A list containing

val.res

A data frame containing the penalties, the validation scores and the corresponding standard errors

best.s

The ideal penalty value


[Package logicDT version 1.0.4 Index]