Questions tagged [catboost]

CatBoost is an open-source gradient boosting on decision trees library with categorical features support out of the box for Python, R

344 questions
26
votes
3 answers

How to suppress CatBoost iteration results?

I am trying to use CatBoost to fit a binary model. When I use the following code, I thought verbose=False can help to suppress the iteration logs. But it didn't. Is there a way to avoid print the iterations? model=CatBoostClassifier(iterations=300,…
Gavin
  • 1,411
  • 5
  • 18
  • 31
14
votes
1 answer

Does Catboost support python3?

I would like to use catboost project, that was recently released to open source community by Yandex. But, I use Python 3 in my projects. I know that Python 3 was prohibited by the Emperor of Yandex. Does catboost support Python 3?
Alexander Lobov
  • 386
  • 2
  • 11
13
votes
2 answers

How to correctly load pretrained model in CatBoost in Python

I have trained CatBoostClassifier to solve my classification task. Now I need to save the model and use it in another app for prediction. In order to do so I have saved model via save_model method and restored it via load_model method. However,…
NShiny
  • 1,046
  • 1
  • 10
  • 19
10
votes
3 answers

for Imbalanced data dealing with cat boost

Is there a parameter like "scale_pos_weight" in catboost package as we used to have in the xgboost package in python ?
Harshit Mehta
  • 328
  • 1
  • 2
  • 11
9
votes
1 answer

How to show catboost plot in google colab?

I was modelling boosting classifier using catboost module in google colaboratory. I followed the official example: from catboost import CatBoostClassifier, Pool train_data = [[1, 3], [0, 4], [1, 7], [0, 3]] train_labels = [1, 0, 1, 1] model =…
BhishanPoudel
  • 15,974
  • 21
  • 108
  • 169
9
votes
3 answers

how to work with the catboost overfitting detector

I am trying to understand the catboost overfitting detector. It is described here: https://tech.yandex.com/catboost/doc/dg/concepts/overfitting-detector-docpage/#overfitting-detector Other gradient boosting packages like lightgbm and xgboost use a…
ftiaronsem
  • 1,524
  • 4
  • 19
  • 32
8
votes
3 answers

shap.force_plot() raises Exeption: In v0.20 force_plot now requires the base value as the first parameter

I'm using Catboost and would like to visualize shap_values: from catboost import CatBoostClassifier model = CatBoostClassifier(iterations=300) model.fit(X, y,cat_features=cat_features) pool1 = Pool(data=X, label=y,…
8
votes
4 answers

How to track categorical indices for catboost with sklearn pipeline

I want to track categorical features indices within sklearn pipeline, in order to supply them to CatBoostClassifier. I am starting with a set of categorical features before the fit() of the pipeline. The pipeline itself changing the structure of the…
Nir Kigelman
  • 121
  • 3
  • 6
7
votes
3 answers

What is Pool in Catboost? When to use Pool instead of numpy array?

I use this code to test CatBoostClassifier. import numpy as np from catboost import CatBoostClassifier, Pool # initialize data train_data = np.random.randint(0, 100, size=(100, 10)) train_labels = np.random.randint(0, 2, size=(100)) test_data =…
user9270170
7
votes
2 answers

How to create custom eval metric for catboost?

Similar SO questions: Python Catboost: Multiclass F1 score custom metric Catboost tutorials https://catboost.ai/docs/concepts/python-usages-examples.html#user-defined-loss-function Question In this question, I have a binary classification…
BhishanPoudel
  • 15,974
  • 21
  • 108
  • 169
7
votes
2 answers

Usage of class_weights in catboostclassifier

How to use 'class_weights' while using CatboostClassifier for Multiclass problem. The documentation says it should be a list but In what order do I need to put the weights? I have a label array with 15 classes from -2 to +2 including decimal…
7
votes
1 answer

Catboost: what are reasonable values for l2_leaf_reg?

Running catboost on a large-ish dataset (~1M rows, 500 columns), I get: Training has stopped (degenerate solution on iteration 0, probably too small l2-regularization, try to increase it). How do I guess what the l2 regularization value should be?…
Guy Adini
  • 5,188
  • 5
  • 32
  • 34
7
votes
2 answers

How to install Yandex CatBoost on Anaconda x64?

I'v successfully installed CatBoost via pip install catboost But I'v got errors, when I tried sample python script in Jupiter Notebook import numpy as np from catboost import CatBoostClassifier ImportError: No module named…
CrazyElf
  • 763
  • 2
  • 6
  • 17
6
votes
2 answers

How can I get the feature importance of a CatBoost in a pandas dataframe?

So I was running a Catboost model using Python, which was pretty simple, basically: from catboost import CatBoostClassifier, Pool, cv catboost_model = CatBoostClassifier( cat_features=["categorical_variable_1", "categorical_variable_2"], …
dummyds
  • 177
  • 1
  • 2
  • 8
6
votes
1 answer

Catboost hyperparams search

I want to use default hyperparams in randomized search, how can I do it? (per_float_feature_quantization param here) grid = {'learning_rate': [0.1, 0.16, 0.2], 'depth': [4, 6, 10], 'l2_leaf_reg': [1, 3, 5, 7, 9], …
gushart
  • 163
  • 10
1
2 3
22 23