'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 "predict"?
I can get the predict values in a list with:
>>> model.get_all_params()["class_names"]
['x', 'y', 'z']
Second question: How can I get the categorical values list? I need the title list of ['a', 'b', 'c'].
I have read the documentation but I couldn't see any solution.
Note: I won't have the original data, I will only have the model file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|