Learn R Programming

rtemis (version 0.79)

s.XGBLIN: XGBoost with linear booster (wrapper for s.XGB)

Description

Train an XGBoost learner with linear boosters

Usage

s.XGBLIN(x, y = NULL, x.test = NULL, y.test = NULL, weights = NULL,
  lambda = NULL, lambda.bias = 0, alpha = 0,
  early_stopping_rounds = 50, force.nrounds = NULL,
  resampler = "strat.sub", n.resamples = 10, train.p = 0.75,
  strat.n.bins = 4, stratify.var = NULL, target.length = NULL,
  seed = NULL, importance = TRUE, n.cores = 1,
  nthread = detectCores(), parallel.type = c("psock", "fork"),
  print.plot = TRUE, outdir = NULL, verbose = TRUE,
  xgb.verbose = FALSE, ...)

Arguments

x

Numeric vector or matrix / data frame of features i.e. independent variables

y

Numeric vector of outcome, i.e. dependent variable

x.test

Numeric vector or matrix / data frame of testing set features Columns must correspond to columns in x

y.test

Numeric vector of testing set outcome

weights

Numeric vector: Weights for cases. For classification, weights takes precedence over ipw, therefore set weights = NULL if using ipw. Note: If weight are provided, ipw is not used. Leave NULL if setting ipw = TRUE. Default = NULL

lambda

[gS] L2 regularization on weights

alpha

[gS] L1 regularization on weights

force.nrounds

Integer: Number of rounds to run if not estimating optimal number by CV

nthread

Integer: Number of threads for xgboost using OpenMP. Only parallelize resamples using n.cores or the xgboost execution using this setting. At the moment of writing, parallelization via this parameter causes a linear booster to fail most of the times. Therefore, default is rtCores for 'gbtree', 1 for 'gblinear'

print.plot

Logical: if TRUE, produce plot using mplot3 Takes precedence over plot.fitted and plot.predicted

outdir

Path to output directory. If defined, will save Predicted vs. True plot, if available, as well as full model output, if save.mod is TRUE

verbose

Logical: If TRUE, print summary to screen.

xgb.verbose

Integer: Verbose level for XGB learners used for tuning.

...

Additional arguments to be passed to s.XGB

Details

[gS] denotes vector will trigger grid search Warning: Using nthread > 1 may lower accuracy - test on your data

See Also

elevate for external cross-validation

Other Supervised Learning: s.ADABOOST, s.ADDTREE, s.BART, s.BAYESGLM, s.BRUTO, s.C50, s.CART, s.CTREE, s.DA, s.ET, s.EVTREE, s.GAM.default, s.GAM.formula, s.GAMSEL, s.GAM, s.GBM3, s.GBM, s.GLMNET, s.GLM, s.GLS, s.H2ODL, s.H2OGBM, s.H2ORF, s.IRF, s.KNN, s.LDA, s.LM, s.MARS, s.MLRF, s.MXN, s.NBAYES, s.NLA, s.NLS, s.NW, s.POLYMARS, s.PPR, s.PPTREE, s.QDA, s.QRNN, s.RANGER, s.RFSRC, s.RF, s.SGD, s.SPLS, s.SVM, s.TFN, s.XGB