You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem occurs when running the predict method of the Learner class:
prediction = explainer.predict(instance)
In this case, labels predicted by the learner are not the labels themselves but the order in which they appear in the dataset.
For example, if the first label in the dataset is 1 and the second is 0, then the learner will respectively predict 0 and 1. Conversely if the first label in the dataset is 0 and the second is 1, then the learner will respectively predict 0 and 1 as expected.
The text was updated successfully, but these errors were encountered:
By default, PyXAI renames labels to integers in order to support string labels.
learner.get_label_from_value(value) and learner.get_value_from_label(label) allow to get the right values.
The python dictionary variable learner.dict_labels contains the encoding performed.
I understand that this can be confusing when the labels are already integers ranging from 0 to X.
I'll make a patch to keep the order in this case. I'll keep you posted.
The problem occurs when running the predict method of the Learner class:
In this case, labels predicted by the learner are not the labels themselves but the order in which they appear in the dataset.
For example, if the first label in the dataset is 1 and the second is 0, then the learner will respectively predict 0 and 1. Conversely if the first label in the dataset is 0 and the second is 1, then the learner will respectively predict 0 and 1 as expected.
The text was updated successfully, but these errors were encountered: