Skip to contents

Calls catboost::catboost.train from package catboost.

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("regr.catboost")
lrn("regr.catboost")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “numeric”, “factor”, “ordered”

  • Required Packages: mlr3extralearners, catboost

Parameters

IdTypeDefaultLevelsRange
loss_functioncharacterRMSEMAE, MAPE, Poisson, Quantile, RMSE, LogLinQuantile, Lq, Huber, Expectile, Tweedie\((-\infty, \infty)\)
iterationsinteger1000\([1, \infty)\)
learning_ratenumeric0.03\([0.001, 1]\)
random_seedinteger0\([0, \infty)\)
l2_leaf_regnumeric3\([0, \infty)\)
bootstrap_typecharacter-Bayesian, Bernoulli, MVS, Poisson, No\((-\infty, \infty)\)
bagging_temperaturenumeric1\([0, \infty)\)
subsamplenumeric-\([0, 1]\)
sampling_frequencycharacterPerTreeLevelPerTree, PerTreeLevel\((-\infty, \infty)\)
sampling_unitcharacterObjectObject, Group\((-\infty, \infty)\)
mvs_regnumeric-\([0, \infty)\)
random_strengthnumeric1\([0, \infty)\)
depthinteger6\([1, 16]\)
grow_policycharacterSymmetricTreeSymmetricTree, Depthwise, Lossguide\((-\infty, \infty)\)
min_data_in_leafinteger1\([1, \infty)\)
max_leavesinteger31\([1, \infty)\)
has_timelogicalFALSETRUE, FALSE\((-\infty, \infty)\)
rsmnumeric1\([0.001, 1]\)
nan_modecharacterMinMin, Max\((-\infty, \infty)\)
fold_permutation_blockinteger-\([1, 256]\)
leaf_estimation_methodcharacter-Newton, Gradient, Exact\((-\infty, \infty)\)
leaf_estimation_iterationsinteger-\([1, \infty)\)
leaf_estimation_backtrackingcharacterAnyImprovementNo, AnyImprovement, Armijo\((-\infty, \infty)\)
fold_len_multipliernumeric2\([1.001, \infty)\)
approx_on_full_historylogicalTRUETRUE, FALSE\((-\infty, \infty)\)
boosting_typecharacter-Ordered, Plain\((-\infty, \infty)\)
boost_from_averagelogical-TRUE, FALSE\((-\infty, \infty)\)
langevinlogicalFALSETRUE, FALSE\((-\infty, \infty)\)
diffusion_temperaturenumeric10000\([0, \infty)\)
score_functioncharacterCosineCosine, L2, NewtonCosine, NewtonL2\((-\infty, \infty)\)
monotone_constraintslist-\((-\infty, \infty)\)
feature_weightslist-\((-\infty, \infty)\)
first_feature_use_penaltieslist-\((-\infty, \infty)\)
penalties_coefficientnumeric1\([0, \infty)\)
per_object_feature_penaltieslist-\((-\infty, \infty)\)
model_shrink_ratenumeric-\((-\infty, \infty)\)
model_shrink_modecharacter-Constant, Decreasing\((-\infty, \infty)\)
target_bordernumeric-\((-\infty, \infty)\)
border_countinteger-\([1, 65535]\)
feature_border_typecharacterGreedyLogSumMedian, Uniform, UniformAndQuantiles, MaxLogSum, MinEntropy, GreedyLogSum\((-\infty, \infty)\)
per_float_feature_quantizationlist-\((-\infty, \infty)\)
thread_countinteger1\([-1, \infty)\)
task_typecharacterCPUCPU, GPU\((-\infty, \infty)\)
deviceslist-\((-\infty, \infty)\)
logging_levelcharacterSilentSilent, Verbose, Info, Debug\((-\infty, \infty)\)
metric_periodinteger1\([1, \infty)\)
train_dirlistcatboost_info\((-\infty, \infty)\)
model_size_regnumeric0.5\([0, 1]\)
allow_writing_fileslogicalFALSETRUE, FALSE\((-\infty, \infty)\)
save_snapshotlogicalFALSETRUE, FALSE\((-\infty, \infty)\)
snapshot_filelist-\((-\infty, \infty)\)
snapshot_intervalinteger600\([1, \infty)\)
simple_ctrlist-\((-\infty, \infty)\)
combinations_ctrlist-\((-\infty, \infty)\)
ctr_target_border_countinteger-\([1, 255]\)
counter_calc_methodcharacterFullSkipTest, Full\((-\infty, \infty)\)
max_ctr_complexityinteger-\([1, \infty)\)
ctr_leaf_count_limitinteger-\([1, \infty)\)
store_all_simple_ctrlogicalFALSETRUE, FALSE\((-\infty, \infty)\)
final_ctr_computation_modecharacterDefaultDefault, Skip\((-\infty, \infty)\)
verboselogicalFALSETRUE, FALSE\((-\infty, \infty)\)
ntree_startinteger0\([0, \infty)\)
ntree_endinteger0\([0, \infty)\)

Installation

The easiest way to install catboost is with the helper function install_catboost.

Custom mlr3 defaults

  • logging_level:

    • Actual default: "Verbose"

    • Adjusted default: "Silent"

    • Reason for change: consistent with other mlr3 learners

  • thread_count:

    • Actual default: -1

    • Adjusted default: 1

    • Reason for change: consistent with other mlr3 learners

  • allow_writing_files:

    • Actual default: TRUE

    • Adjusted default: FALSE

    • Reason for change: consistent with other mlr3 learners

  • save_snapshot:

    • Actual default: TRUE

    • Adjusted default: FALSE

    • Reason for change: consistent with other mlr3 learners

References

catboost: unbiased boosting with categorical features. Liudmila Prokhorenkova, Gleb Guse, Aleksandr Vorobev, Anna Veronika Dorogush and Andrey Gulin. 2017. https://arxiv.org/abs/1706.09516.

catboost: gradient boosting with categorical features support. Anna Veronika Dorogush, Vasily Ershov and Andrey Gulin. 2018. https://arxiv.org/abs/1810.11363.

See also

Author

sumny

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCatboost

Methods

Inherited methods


Method new()

Create a LearnerRegrCatboost object.

Usage


Method importance()

The importance scores are calculated using catboost.get_feature_importance, setting type = "FeatureImportance", returned for 'all'.

Usage

LearnerRegrCatboost$importance()

Returns

Named numeric().


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrCatboost$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (requireNamespace("catboost", quietly = TRUE)) {
  learner = mlr3::lrn("regr.catboost")
  print(learner)

  # available parameters:
  learner$param_set$ids()
}