catboost / catboost/catboost

get_feature_names functionality was broken for R

Open
#3,116 0 comments 0 reactions 0 assignees View on GitHub
R
Dominant language
C++
Stars
9.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

R binding never have official get_feature_names function, but this functionality was available in two ways, bot of them are now broken.

1.
```
# Fetch the feature importance matrix using your model and training pool
importance_matrix <- catboost.get_feature_importance(model, pool = train_pool)
# Extract the feature names from the row names of the matrix
feature_names <- rownames(importance_matrix)
```
or almost the same:
`feature_names <- attr(catboost_model$feature_importances, "dimnames")[[1]]`

Now this is broken, names on matix will be empty.

2.
`catboost.get_model_params(model)`
and somewhere in this structure was the feature names. Now they are not here.

Because of this some libriries like treeshap (https://github.com/ModelOriented/treeshap/tree/catboost) is broken now.

Could you please restore old functionality or make separate call/field "feature names"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.