Skip to contents

Setup hyperparameters for LightRuleFit training.

Usage

setup_LightRuleFit(
  nrounds = 200L,
  num_leaves = 32L,
  max_depth = 4L,
  learning_rate = 0.1,
  subsample = 0.666,
  subsample_freq = 1L,
  lambda_l1 = 0,
  lambda_l2 = 0,
  objective = NULL,
  ifw_lightgbm = FALSE,
  alpha = 1,
  lambda = NULL,
  ifw_glmnet = FALSE,
  ifw = FALSE
)

Arguments

nrounds

(Tunable) Positive integer: Number of boosting rounds.

num_leaves

(Tunable) Positive integer: Maximum number of leaves in one tree.

max_depth

(Tunable) Integer: Maximum depth of trees.

learning_rate

(Tunable) Numeric: Learning rate.

subsample

(Tunable) Numeric: Fraction of data to use.

subsample_freq

(Tunable) Positive integer: Frequency of subsample.

lambda_l1

(Tunable) Numeric: L1 regularization.

lambda_l2

(Tunable) Numeric: L2 regularization.

objective

Character: Objective function.

ifw_lightgbm

(Tunable) Logical: If TRUE, use Inverse Frequency Weighting in the LightGBM step.

alpha

(Tunable) Numeric: Alpha for GLMNET.

lambda

Numeric: Lambda for GLMNET.

ifw_glmnet

(Tunable) Logical: If TRUE, use Inverse Frequency Weighting in the GLMNET step.

ifw

Logical: If TRUE, use Inverse Frequency Weighting in classification. This applies IFW to both LightGBM and GLMNET.

Value

LightRuleFitHyperparameters object.

Details

Get more information from lightgbm::lgb.train.

Author

EDG

Examples

lightrulefit_hyperparams <- setup_LightRuleFit(nrounds = 300L, max_depth = 3L)
lightrulefit_hyperparams
#> <LightRuleFitHyperparameters>
#>         hyperparameters: 
#>                                 nrounds: <int> 300
#>                              num_leaves: <int> 32
#>                               max_depth: <int> 3
#>                           learning_rate: <nmr> 0.10
#>                               subsample: <nmr> 0.67
#>                          subsample_freq: <int> 1
#>                               lambda_l1: <nmr> 0.00
#>                               lambda_l2: <nmr> 0.00
#>                               objective: <NUL> NULL
#>                            ifw_lightgbm: <lgc> FALSE
#>                                   alpha: <nmr> 1.00
#>                                  lambda: <NUL> NULL
#>                              ifw_glmnet: <lgc> FALSE
#>                                     ifw: <lgc> FALSE
#> tunable_hyperparameters: <chr> nrounds, num_leaves, max_depth, learning_rate, subsample, subsample_freq, lambda_l1, lambda_l2, alpha, ifw_lightgbm, ifw_glmnet
#>   fixed_hyperparameters: <chr> lambda, objective
#>                   tuned: <int> -1
#>               resampled: <int> 0
#>               n_workers: <int> 1
#> 
#>   No search values defined for tunable hyperparameters.