definePenalty: Define regularization object for predictor and external data

Description Usage Arguments

View source: R/definePenalty.R

Description

Defines regularization terms for predictor and external data in hierr fitting.

Usage

1
2
3
4
5
definePenalty(penalty_type = 0, quantile = 0.5, penalty_type_ext = 1,
  quantile_ext = 0.5, num_penalty = 20, num_penalty_ext = 20,
  penalty_ratio = NULL, penalty_ratio_ext = NULL,
  user_penalty = NULL, user_penalty_ext = NULL,
  custom_multiplier = NULL, custom_multiplier_ext = NULL)

Arguments

penalty_type

type of regularization for x. Default is 0 (Ridge). Can supply either a scalar value or vector with length equal to the number of variables in x.

  • 0 = Ridge

  • (0,1) = Elastic-Net

  • 1 = Lasso / Quantile

quantile

specifies quantile for predictors. Default of 0.5 reduces to lasso.

penalty_type_ext

type of regularization for external data. See penalty_type for options. Default is 1 (lasso). Can supply either a scalar value or vector with length equal to the number of variables in external.

quantile_ext

specifies quantile for external data. Default of 0.5 reduces to lasso.

num_penalty

number of penalty values to fit in grid for x. Default is 20.

num_penalty_ext

number of penalty values to fit in grid for external data. Default is 20.

penalty_ratio

ratio between minimum and maximum penalty for x. Default is 1e-04 if n > p and 0.01 if n <= p.

penalty_ratio_ext

ratio between minimum and maximum penalty for external data. Default is 1e-04 if p > q and 0.01 if p <= q.

user_penalty

user-defined vector of penalty values to fit for x.

user_penalty_ext

user-defined vector of penalty values to fit for external data.

custom_multiplier

variable-specific penalty multipliers for x. Default is 1 for all variables. 0 is no penalization.

custom_multiplier_ext

variable-specific penalty multipliers for external data. Default is 1 for all variables. 0 is no penalization.


gmweaver/hierr documentation built on Dec. 2, 2018, 5:36 p.m.