init_penalized: Initialize a penalized linear regression model

Description Usage Arguments Value

Description

Creates an object designed to be passed to init_stacker that describes an glm/penalized regression model be added to the stacking ensemble.

Usage

1
2
init_penalized(model_name = "pen", arguments = list(alpha = 1),
  emp_logit = F, standardize = F)

Arguments

model_name

name of the penalized regression model model

arguments

named list. Arguments to be passed to the glmnet function. See help glmnet::glmnet for more information. The main arguement to be passed is alpha: 0 is ridge regression and 1 is lasso penalty. Between 0 and 1 refers to elastic net.

emp_logit

logical. If family is binomial, should the regression be run as gaussian (empirical logit of cases/N)

standardize

logical. Standardize numeric columns to have zero mean and unit variance. Defaults to False unlike the glmnet default settings. This is set to F, because centre scaling/normalizing is a default preprocessing step

Value

named list of lists with the parameters required to run an penalized regression model


dahcase/mbgstacking documentation built on May 20, 2019, 4:08 p.m.