catboost.train {catboost}R Documentation

Train the model

Description

Train the model using a CatBoost dataset.

Usage

catboost.train(learn_pool, test_pool = NULL, params = list())

Arguments

learn_pool

The dataset used for training the model.

Default value: Required argument

test_pool

The dataset used for testing the quality of the model.

Default value: NULL (not used)

params

The list of parameters to start training with.

If omitted, default values are used (see The list of parameters).

If set, the passed list of parameters overrides the default values.

Default value: Required argument

Details

The list of parameters

See Also

https://catboost.ai/docs/concepts/r-reference_catboost-train.html

Examples

train_pool_path <- system.file("extdata", "adult_train.1000", package = "catboost")
test_pool_path <- system.file("extdata", "adult_test.1000", package = "catboost")
cd_path <- system.file("extdata", "adult.cd", package = "catboost")
train_pool <- catboost.load_pool(train_pool_path, column_description = cd_path)
test_pool <- catboost.load_pool(test_pool_path, column_description = cd_path)
fit_params <- list(
    iterations = 100,
    loss_function = 'Logloss',
    ignored_features = c(4, 9),
    border_count = 32,
    depth = 5,
    learning_rate = 0.03,
    l2_leaf_reg = 3.5,
    train_dir = 'train_dir')
model <- catboost.train(train_pool, test_pool, fit_params)

[Package catboost version 0.23 Index]