How to achieve SHAP values for a CatBoost model in R? I'm asked to create a SHAP analysis in R but I cannot find it how to obtain it for a CatBoost model. I can get the SHAP values of an XGBoost model with
shap_values &lt;- shap.values(xgb_model = model, X_train = train_X)

but not for CatBoost.
Here is the reproducible code for my CatBoost model:
library(data.table)
library(catboost)

train_example &lt;- data.table(categorical_feature = c(&quot;a&quot;, &quot;b&quot;, &quot;a&quot;, &quot;a&quot;, &quot;b&quot;), payment = c(244, 52352, 4235, 3422, 535), age = c(34, 27, 19, 40, 92), target = c(0,0,1,0,1))
label_values_train &lt;- train_example$target
train_X &lt;-train_example[, - "target"]
train_X$categorical_feature &lt;- as.factor(train_X$categorical_feature)
# datapool for the train dataset:
pool &lt;- catboost.load_pool(train_X, label = label_values_train, cat_features = 1)
fit_params_report &lt;- list(iterations = 1000,
                          loss_function = 'Logloss',
                          eval_metric='F1',
                          border_count = 42,
                          depth = 8,
                          learning_rate = 0.04,
                          l2_leaf_reg = 0.001,
                          task_type = 'CPU')
 
model &lt;- catboost.train(pool, params = fit_params_report)
  

How can I proceed to get the SHAP values here?
catboost::catboost.get_feature_importance(model, pool = pool, type = &quot;ShapValues&quot;)