Using pycaret 2.3.10 for a multi-class problem.
from pycaret.classification import *
...
config = setup(X_null, 'YEAR', silent=True, fold=5, use_gpu=True, )
How can I extract the class labels? I know the classes, but I don't know the order that pycaret applies. In my case I have a number of years and I don't know whether class 1 corresponds to the first year, for examples. Or if I have 'Cats', 'Dogs', 'Monkeys', the classes are not ordinal. So, the ordering could depend on the dataset. Whatever appears first in the dataset. Or it is sorted?
Is there a way to extract the class labels in the correct order programmatically?
In PyCaret 2.X, you will get a list of information from the
setup
step so you can getLabel Encoded
using the below codeIn PyCaret 3.X, you will get Experiment object from the
setup
step so you can getTarget Mapping
using the below code