Skip to content

Catboost.cv in R does not work #946

@acmilannesta

Description

@acmilannesta

Problem: Fail to call catboost.cv
catboost version: catboost R package (0.16)
Operating System: Win10
CPU: 6 cores

GPU: 0

When I try to run catboost.cv and use AUC metrics like following:

library(catboost)
library(dplyr)

cat_tr = catboost.load_pool(data = train %>% select(-c(ID_code, target)),
                            label = train$target)
catboost.cv(cat_tr,
                    params = list(loss_function='Logloss',
                                  eval_metric='AUC',
                                  iterations=5,
                                  l2_leaf_reg=100,
                                  depth=5,
                                  use_best_model=T),
                    fold_count = 3,
                    stratified = T,
                    )

Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 0, 5

However, if I remove the "eval_metric", the error disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions