train_lightgbm: train_lightgbm

Description Usage Arguments

View source: R/train_lightgbm.R

Description

A wrapper function that automates the lightGBM training process

Usage

1
2
3
train_lightgbm(dtrain, dvalid = NULL, x, y, w = NULL, LgbParams,
  nrounds = 5000, stratified = FALSE, early_stopping_rounds = 5,
  nfold = 5, folds = NULL, verbose = 1, seed = 1921, ...)

Arguments

dtrain

A data.frame that contains the training data

dvalid

A data.frame that contains the validation data. If NULL then the function uses cross validation. Defaults to NULL.

x

A list of column names that identify the explanatory features

y

A column name that identifies that target variable

w

A column name that contains the name of the weight column. Defaults to NULL

LgbParams

A named list containing the lightgbm Learning Parameters

nrounds

The maximum number of iterations

early_stopping_rounds

If performance doesnt improve for this many rounds then stop training

nfold

How many folds to use if doing cross validation

folds

A list of pre defined fold indicies (test indicies) - see main lightgbm docs for more details.

verbose

Print run time messages

seed

An integer which will be used as the random seed. Defaults to 1921

...

Additional Arguments to be passed to lgb.cv and/or lgb.train


gm209/gmtools documentation built on May 22, 2019, 2:39 p.m.