R/LearnerClassifXgboost.R
mlr_learners_classif.xgboost.RdeXtreme Gradient Boosting classification.
Calls xgboost::xgb.train() from package xgboost.
nrounds:
Actual default: no default
Adjusted default: 1
Reason for change: Without a default construction of the learner
would error. Just setting a nonsense default to workaround this.
nrounds needs to be tuned by the user.
verbose:
Actual default: 1
Adjusted default: 0
Reason for change: Reduce verbosity.
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():
mlr_learners$get("classif.xgboost") lrn("classif.xgboost")
Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: A scalable tree boosting system.” In Proceedings of the 22nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 785--794. ACM. doi: 10.1145/2939672.2939785 .
mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost
new()Creates a new instance of this R6 class.
LearnerClassifXgboost$new()
importance()The importance scores are calculated with xgboost::xgb.importance().
LearnerClassifXgboost$importance()
Named numeric().
clone()The objects of this class are cloneable with this method.
LearnerClassifXgboost$clone(deep = FALSE)
deepWhether to make a deep clone.
if (requireNamespace("xgboost")) { learner = mlr3::lrn("classif.xgboost") print(learner) # available parameters: learner$param_set$ids() }#>#> <LearnerClassifXgboost:classif.xgboost> #> * Model: - #> * Parameters: verbose=0, nrounds=1 #> * Packages: xgboost #> * Predict Type: response #> * Feature types: logical, integer, numeric #> * Properties: importance, missings, multiclass, twoclass, weights#> [1] "booster" "watchlist" #> [3] "eta" "gamma" #> [5] "max_depth" "min_child_weight" #> [7] "subsample" "colsample_bytree" #> [9] "colsample_bylevel" "colsample_bynode" #> [11] "num_parallel_tree" "lambda" #> [13] "lambda_bias" "alpha" #> [15] "objective" "eval_metric" #> [17] "base_score" "max_delta_step" #> [19] "missing" "monotone_constraints" #> [21] "tweedie_variance_power" "nthread" #> [23] "nrounds" "feval" #> [25] "verbose" "print_every_n" #> [27] "early_stopping_rounds" "maximize" #> [29] "sample_type" "normalize_type" #> [31] "rate_drop" "skip_drop" #> [33] "one_drop" "tree_method" #> [35] "grow_policy" "max_leaves" #> [37] "max_bin" "callbacks" #> [39] "sketch_eps" "scale_pos_weight" #> [41] "updater" "refresh_leaf" #> [43] "feature_selector" "top_k" #> [45] "predictor" "save_period" #> [47] "save_name" "xgb_model" #> [49] "interaction_constraints" "outputmargin" #> [51] "ntreelimit" "predleaf" #> [53] "predcontrib" "approxcontrib" #> [55] "predinteraction" "reshape" #> [57] "training"