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
295
questions
0
votes
0
answers
13
views
multilabel classification with counts
I am trying to train a model for multi-output/multilabel classification where the labels are not binary but counts. Suppose the possible labels are A, B, C, D and E, for example, the y matrix could ...
0
votes
1
answer
56
views
How to create a for loop with checking appended models
I have a list of models that I iterate through in a for loop getting their performances. I've added catboost to my model list, but when I try to add it's best estimator to a dictionary it gives me an ...
0
votes
1
answer
33
views
Catboost does not show plot when specifying plot=true in model.fit
https://i.stack.imgur.com/Z3WYl.png
https://i.stack.imgur.com/j3udw.png
Catboost doesnt show plot. I am using mac m1 arm. Jupyter is locally installed.
Selected Jupyter core packages...
IPython ...
0
votes
1
answer
58
views
How should I itrate over csv file row by row to get 1 prediction at the time
My code:
counter = 0
while True :
try :
test = pd.read_csv('test.csv' , nrows = 1 , skiprows = (counter) )
counter += 1
except:
sleep(1)
print('sleep')
...
0
votes
0
answers
30
views
Categorical features with Catboost Spark
I am currently coding with catboost_spark version '1.0.3'. When I try to do a regression, I have this error message :
Internal CatBoost Error (contact developers for assistance): attempt to interpret ...
0
votes
0
answers
59
views
ERROR: No matching distribution found for catboost on ARM64 architecture
I am trying to build a multi-architecture image for ARM64 using buildx command. I am using python:3.8-slim as a base image and trying to install catboost using pip, but I am getting the following ...
1
vote
1
answer
26
views
How to automatically choose meaning num_features_to_select with best result in select_features from CatBoostClassifier?
I'm writting a class on Python, where I'm trying to automatically pick up a value of num_features_to_select in CatBoostClassifier().select_features(). Right now, function uses enumeration of ...
0
votes
0
answers
32
views
CatBoostClassifier fail to train on Databricks cluster
I am getting a very strange error with CatBoost Spark on Databricks cluster.
Below is the error; The CatBoostClassifier.fit() will fail on starter code.
enter image description here
1
vote
0
answers
29
views
How to implement calculating pAUC and its derivatives in python?
According to this paper, the method of maximizing pAUC is useful for unbalanced binary classification problems.
Since gradient boosting libraries such as LightGBM, CatBoost and XGBoost do not ...
0
votes
0
answers
40
views
Can't interpret SHAP value output from custom CatBoost model
I have built a sentiment analysis classifier. I want to get feature (word) importance weights from my model, in a format such as
-0.098432 violent
I want these values for each word in a string that ...
1
vote
0
answers
38
views
Catboost Python: How to interpret the MAE and R2 values
I have fitted a regression model using Catboost. I want to predict tax values. The target variable which I am trying to predict is:
count 192687.00000
mean 94280.45840
std ...
0
votes
0
answers
378
views
CatBoost was working on Mac M1 until 5th March, 2022
I tried out the cat boost regressor just about a week back and now when I run it, it seems to have been uninstalled! So when I try to re-install cat boost, it says
ERROR: Could not find a version that ...
0
votes
0
answers
37
views
Catboost doesn't train on the GPU if I use it to replace with another model's linear layer output
For the sake of experiment, I want to train CRNN with replacing the output of the linear layer with CatBooostRegressor () but when I start the training on the GPU, it gives an error. I'm assuming it ...
1
vote
2
answers
185
views
Obtaining summary shap plot for catboost model with tidymodels in R
I am trying to build a catboost model within the tidymodels framework. Minimal reproducible example is given below. I am able to use the DALEX and modelStudio packages to get model explanations but I ...
0
votes
0
answers
50
views
CatBoostError: catboost/libs/model/model.cpp:1716: Approx dimensions don't match: 92 != 89
I use the CatBoostModel by vaex.
transactions_sample_merged is a 10000x10 DataFrame.
<class 'pandas.core.frame.DataFrame'>
Int64Index: 10000 entries, 0 to 9999
Data columns (total 10 columns):
#...
1
vote
0
answers
42
views
How to get categorical values in catboost
This is my data. I created a model with CatBoostClassifier().
I can get the feature names list with:
>>> model.feature_names_
['title', 'value']
First question: How can I get the title "...
0
votes
0
answers
81
views
Is there a way to control feature interactions in CatBoost as in lightGBM and XGBoost (`interaction_constraints`)
In lightGBM or XGBoost, there is a way to constraint feature interactions
XGBoost interaction constraints lightGBM interaction constraints
Does CatBoost have the same feature or provide a way to ...
0
votes
0
answers
40
views
Getting type error in catboost training data
I have this code :
textual_features = ["UNIQUE_CODE", "FILIAL_CODE", "CURRENCY", 'SUBJECT']
feature_columns = ['LOAN_ID', 'SUMM_LOAN',
'TOTAL_LOAN', '...
0
votes
0
answers
56
views
How does CatBoost encode categorical variables on test set?
From the papers ve documentations of CatBoost I can understand how it encodes categorical variables on the training set. But how the categorical variables are encoded in the test set is a mystery. I ...
2
votes
1
answer
220
views
Difference in model feature importance and SHAP summary plot
I have been playing around the toy dataset to understand more about shap library and usage. I found this issue that the feature importances from the catboost regressor model is different than the ...
0
votes
0
answers
79
views
Shap library for model explanation gives values outside range of 0 to 1
I have a catboost model and I am trying to draw a decision plot for some of the sample records to see which features are driving the prediction towards 0 or 1. However, I noticed that the range of the ...
0
votes
0
answers
13
views
Is there a video recording for ODSC Europe 2021 event?
I came across this particular tutorial : https://github.com/catboost/tutorials/tree/master/events/2021_06_09_odsc_europe
" Mastering Gradient Boosting with CatBoost "
I wonder if there is a ...
0
votes
0
answers
12
views
Extract imputation info from Catboost
I have a Catboost model fit where the nan_mode was set to 'Min'.
Is there a way to extract the feature name and corresponding value [used for imputing] from the model object itself?
0
votes
0
answers
29
views
How does CatBoost encode categorical variables in regression?
In its documentation CatBoost states that quantization is applied to the target variable when encoding categorical variables in regression tasks. Basically we bin the target into k bins. Is there a ...
0
votes
0
answers
30
views
Catboost not working properly when I remove non important variables
I was wondering if anyone has encountered the same. The thing is, when I run a catboost boosting model, delete non important variables (feature importance by prediction importance = 0, in fact these ...
1
vote
1
answer
340
views
Missing values in Categorical Variables in CatBoost (python)
CatBoost can encode categorical variables which is great. However, when categorical features contain missing values in the form np.nan, they can't be processed. This is stated in CatBoost ...
0
votes
0
answers
31
views
CatBoost: User-Defined Loss with Multi-Threading
I am trying to experiment with different user-defined loss (UDL) functions in CatBoost, and realized that my training job with UDL was only able to use a single-thread (CatBoost version 1.0.3 on CPUs)....
2
votes
1
answer
135
views
Predicting probabilities in CatBoost regressor
Does CatBoost regressor have a method to predict the probabilities of each prediction? I see one for CatBoost classifier (https://catboost.ai/en/docs/concepts/python-...
0
votes
0
answers
35
views
How to delete LightGBM/CatBoost model and free RAM?
I have LightGBM/CatBoost models in a list.
Like:
lgb_models = [model1,model2,model3]
I tried to this:
for model in lgb_models
del model
del lgb_models
gc.collect()
But it did not free my RAM. ...
0
votes
1
answer
48
views
module 'pandas' has no attribute 'sparsedtype' - Catboost classifier
I am working on catboost classifier algorithm and while doing model fit - I am getting this error -module 'pandas' has no attribute 'sparsedtype'. Any suggestion pls.
I am using Pandas version - 0.23....
2
votes
1
answer
164
views
Get Confidence probability Scores for each Predicted Result in Catboost Classifier
I have built a machine learning model using Catboost classifier to predict the categoryname of my result as per below screenshot1. However, if I get an unknown as input or any input with which the ...
0
votes
1
answer
52
views
Error while hyperparameter tuning using BayesSearchCV for CatBoostClassifier (Multiclass classification)
I am trying to tune hyperparameters for Multiclassclassification with CatBoostClassifier but getting below error.
ValueError: multiclass format is not supported
My target variable contains (0,1,2,3)
...
0
votes
0
answers
19
views
Catboost via grid search command line
I have trained a model and now I'd like to do the same thing via command line
model = CatBoostClassifier(loss_function='MultiClass', cat_features=cat_features)
params = {'iterations': [100, 150, 200],...
2
votes
1
answer
200
views
How to feed text features into catboost model.predict
I am trying to use CatBoost for an NLP multiclass classification problem, trying to classify sentences based upon their labels.
This is fine for the training of the model by using the text_features ...
0
votes
0
answers
73
views
Unable to plot ROC curve in catboost
I am trying to plot ROC curve in catboost.
While running the model and prediction it has no problem. But while plotting the ROC curve it shows that some column is category but has not been passed as ...
0
votes
1
answer
61
views
Very strange accuracy change?
Below is my catboost model:
from sklearn.metrics import r2_score
cb_model = CatBoostRegressor(iterations=500,
learning_rate=0.05,
depth=10,
...
0
votes
0
answers
128
views
visualizing Catboost tree - graphviz
I'm trying to visualize the result of by CatBoostClassifier in Databricks.
I have graphviz ==0.18.2 installed on my cluster.
When I use the following code (NB. model is my trained CatBoostClassifier):
...
0
votes
0
answers
61
views
pickle (or pickle like) serialization in python for objects with members that have custom file formats and serialization logic
I need to serialize python classes that contain fields that require custom serialization (for example: catboost models, but there are many other examples)
in simple cases I provide a save and load ...
0
votes
0
answers
89
views
Quantile Regression For Multiple Targets Simultaneously
I am able to fit several targets using the MultiRMSE loss function, but I'm not sure how to estimate uncertainty for multiple targets. How can one perform quantile regression for multiple targets?
0
votes
0
answers
51
views
Catboost how to save model to python memory object and not disk
We like to use Catboost in an environment where we dont have permission to save data todisk. We found: https://github.com/catboost/tutorials/blob/master/model_analysis/model_export_as_json_tutorial....
3
votes
1
answer
90
views
How do I know the order of the classes in a CatBoost classifier weights?
This is a pretty dumb question, but I couldn't find anywhere, so I will take my chances in here...
I'm building a classifier using CatBoost. Since this is a NLP problem, my features are the words/...
0
votes
0
answers
41
views
Performance call the C++ CatBoost lib from the Java code by JNI
We know that call a native method directly from the Java code has a significant overhead. JNI overhead
The official CatBoost java library do that by CatBoostJNIImpl class which expose some several ...
0
votes
0
answers
60
views
Why different importance in two same features in catboost
I made a catboost model using some features.
Two features are exactly same.
.
Result of catboost, one feature's importance is 26% but others importance is 7%.
same feature but different importance.
...
1
vote
1
answer
69
views
CatBoostError: catboost/libs/train_lib/dir_helper.cpp:20: Can't create train working dir:
I am running catboost on Databricks cluster. Databricks Production cluster is very secure and we cannot create new directory on the go as a user. But we can have pre-created directories. I am passing ...
0
votes
0
answers
18
views
how can I get the type of every hyperparameter of a catboost, xgboost?
I get the type of each hyperparamter <class 'NoneType'>. Because the default values of catboost are None. But i want to get something like float, int, dict. pretty appreciate for any help.
...
0
votes
1
answer
427
views
Optuna for Catboost outputs "trials" in random order?
I'm working on hyperparameter tuning using Optuna for CatboostRegressor, however I realised that the trials I'm getting are in random order (mine started with Trial 7 and then Trial 5 then Trial 8. ...
0
votes
0
answers
67
views
How to implement select_threshold in Catboost predict method?
I trained CatBoostClassifier model and calculated the select_threshold
catboost_pool = Pool(X_train, y_train, cat_features= cat_feature)
roc_curve_values = get_roc_curve(model, catboost_pool)
boundary ...
2
votes
1
answer
188
views
CatBoost: Are we overfitting?
Our team is currently using CatBoost to develop credit scoring models, and our current process is to...
Sort the data chronologically for out-of-time sampling, and split it into train, valid, and ...
1
vote
1
answer
161
views
Passing a Go slice of float32 to CGo as a C float[]
I'm trying to use catboost to predict for one array of floats.
In the documentation for CalcModelPredictionSingle it takes as param "floatFeatures - array of float features":
https://github....
0
votes
0
answers
53
views
Quantile regression with monotonic constraints
I'm facing an issue in CatBoost when trying to use quantile regressions with monotone constraints for some features.
The quantile loss uses "Exact" as the leaf estimation method, but ...