AutoxgboostMC: Fit and optimize a xgboost model for multiple criteria

Description Usage Arguments Format Examples

Description

An xgboost model is optimized based on a set of measures (see [Measure]). The bounds of the parameter in which the model is optimized, are defined by autoxgbparset. For the optimization itself Bayesian Optimization with mlrMBO is used. Without any specification of the control object, the optimizer runs for for 160 iterations or 1 hour, whichever happens first. Both the parameter set and the control object can be set by the user.

Arguments to '.$new()':

Usage

1

Arguments

measures

[list of Measure]
Performance measure. If NULL getDefaultMeasure is used.

early_stopping_measure

[Measure]
Performance measure used for early stopping. Picks the first measure defined in measures by default.

parset

[ParamSet]
Parameter set to tune over. Default is autoxgbparset. Can be updated using '.$set_parset()'.

nthread

[integer(1)]
Number of cores to use. If NULL (default), xgboost will determine internally how many cores to use. Can be set using '.$set_nthread()'.

Arguments to '.$fit()':

task

[Task]
The task to be trained.

iterations

[integer(1L]
Number of MBO iterations to do. Will be ignored if custom control is used. Default is 160.

time.budget

[integer(1L]
Time that can be used for tuning (in seconds). Will be ignored if a custom control is used. Default is 3600, i.e., one hour.

build.final.model

[logical(1)]
Should the model with the best found configuration be refitted on the complete dataset? Default is FALSE.

control

[MBOControl]
Control object for optimizer. If not specified, the default makeMBOControl] object will be used with iterations maximum iterations and a maximum runtime of time.budget seconds.

Additional arguments that control the process:

mbo.learner

[Learner]
Regression learner from mlr, which is used as a surrogate to model our fitness function. If NULL (default), the default learner is determined as described here: mbo_default_learner. Can be set using '.$set_mbo_learner()'.

design.size

[integer(1)]
Size of the initial design. Default is 15L. Can be set via '.$set_design_size()'

max.nrounds

[integer(1)]
Maximum number of allowed boosting iterations. Default is 10^6. Can be set via '.$set_max_nrounds()'.

early.stopping.rounds

[integer(1L]
After how many iterations without an improvement in the boosting OOB error should be stopped? Default is 10. Can be set via '.$set_early_stopping_rounds()'.

early.stopping.fraction

[numeric(1)]
What fraction of the data should be used for early stopping (i.e. as a validation set). Default is 4/5. Can be set via '.$set_early_stopping_fraction()'.

impact.encoding.boundary

[integer(1)]
Defines the threshold on how factor variables are handled. Factors with more levels than the "impact.encoding.boundary" get impact encoded while factor variables with less or equal levels than the "impact.encoding.boundary" get dummy encoded. For impact.encoding.boundary = 0L, all factor variables get impact encoded while for impact.encoding.boundary = .Machine$integer.max, all of them get dummy encoded. Default is 10. Can be set via '.$set_impact_encoding_boundary()'.

tune.threshold

[logical(1)]
Should thresholds be tuned? This has only an effect for classification, see tuneThreshold. Default is TRUE. Can be set via '.$set_tune_threshold()'.

Format

An object of class R6ClassGenerator of length 24.

Examples

1
2
3
4
iris.task = makeClassifTask(data = iris, target = "Species")
axgb = AutoxgboostMC$new(measure = auc)
axgb$fit(t, time.budget = 5L)
p = axgb$predict(iris.task)

ja-thomas/autoxgboostMC documentation built on May 17, 2019, 4:22 a.m.