xgb_bin: Automatically models categorical targets with random search...

Description Usage Arguments Value

View source: R/xgb_bin.R

Description

Automatically models categorical targets with random search hyperparameter optimziation. XGBoost model trains with lossguide and histogram tree method to accelerate tuning.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
xgb_bin(
  df_train,
  df_test,
  tune_rounds = 25L,
  verbose = T,
  max_rounds = 10^6,
  cv_folds = 5L,
  early_stopping_rounds = 10L,
  folds = NULL
)

Arguments

df_train

Training data.frame with column called "target" for training. All columns should be numeric and prepared with a package like vtreat.

df_test

Testing data.frame with column called "target" for evaluation. All columns should be numeric and prepared with a package like vtreat.

tune_rounds

Integer (e.g. 25L) indicating the number of hyperoptimization tuning rounds.

verbose

Print model iterations (T/F).

max_rounds

Maximum number of rounds to use in model fitting.

cv_folds

Integer (e.g. 5L) that sets the number of cross validation folds to use in model tuning.

early_stopping_rounds

Integer (e.g. 10L) that sets xgb.cv early_stopping_rounds parameter.

folds

Allows users to specify their own folds (e.g. stratified folds).

Value

model, data, and model results


prescient/modelpipe documentation built on Dec. 25, 2019, 3:20 a.m.