IndexError while saving the explainer object
AlexGerl89 opened this issue · comments
Hello Marco,
I had an IndexError with your code while I wanted to save the exp object. The exp object could be used to print for example exp.names, exp.precision etc.
This is the Error: IndexError: only integers, slices (:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices
I have trained the XGBoost model with a numpy.array and also used a numpy array as train and test set for the explainer. For the labels I used "1" for errors and "0" as OK instance.
Hey Marco,
I found a solution for this problem. In file anchor_tabulator.py line 136 "predicted_label = exp['prediction']" I got a float instead of a int value. Therefore, I wrote a new line with "predicted_label = int(predicted_label)" as line 137.