xgb_params: XGboost Parameters

Description Usage Arguments Value See Also

View source: R/model_training.R

Description

xgb_params is the list of parameters to train a XGB model using in training_model. xgb_params_search is for searching the optimal parameters of xgboost,if any parameters of params in xgb_params is more than one.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
xgb_params(
  nrounds = 1000,
  params = list(max_depth = 6, eta = 0.01, gamma = 0, min_child_weight = 1, subsample =
    1, colsample_bytree = 1, scale_pos_weight = 1),
  early_stopping_rounds = 100,
  method = "random_search",
  iters = 10,
  f_eval = "auc",
  nfold = 1,
  nthread = 2,
  ...
)

xgb_params_search(
  dat_train,
  target,
  dat_test = NULL,
  x_list = NULL,
  prop = 0.7,
  occur_time = NULL,
  method = "random_search",
  iters = 10,
  nrounds = 100,
  early_stopping_rounds = 10,
  params = list(max_depth = 6, eta = 0.01, gamma = 0, min_child_weight = 1, subsample =
    1, colsample_bytree = 1, scale_pos_weight = 1),
  f_eval = "auc",
  nfold = 1,
  nthread = 2,
  ...
)

Arguments

nrounds

Max number of boosting iterations.

params

List of contains parameters of xgboost. The complete list of parameters is available at: http://xgboost.readthedocs.io/en/latest/parameter.html

early_stopping_rounds

If NULL, the early stopping function is not triggered. If set to an integer k, training with a validation set will stop if the performance doesn't improve for k rounds.

method

Method of searching optimal parameters."random_search","grid_search","local_search" are available.

iters

Number of iterations of "random_search" optimal parameters.

f_eval

Custimized evaluation function,"ks" & "auc" are available.

nfold

Number of the cross validation of xgboost

nthread

Number of threads

...

Other parameters

dat_train

A data.frame of train data. Default is NULL.

target

Name of target variable.

dat_test

A data.frame of test data. Default is NULL.

x_list

Names of independent variables. Default is NULL.

prop

Percentage of train-data after the partition. Default: 0.7.

occur_time

The name of the variable that represents the time at which each observation takes place.Default is NULL.

Value

A list of parameters.

See Also

training_model, lr_params,gbm_params, rf_params


creditmodel documentation built on Jan. 7, 2022, 5:06 p.m.