Explainability Example

Following the code from Basic Usage.

Initializing

import shap
from infodeslib.des.knorau import KNORAU

colors = {0: 'red', 1: 'green'}

knorau = KNORAU(model_pool, feature_sets, k=7, colors=colors)
knorau.fit(X_dsel, y_dsel)

Selecting one instance

index = 18
query = X_test.iloc[[index]]

## Make plot=True
knorau.predict(query, plot=True)

Estimating Region of competence (RoC) in validation dataset

https://raw.githubusercontent.com/adv-panda/infodeslib_docs/main/docs/source/images/xai_1.PNG

Detailed information about the selected samples in RoC:

https://raw.githubusercontent.com/adv-panda/infodeslib_docs/main/docs/source/images/xai_2.PNG

The contribution of each selected classifier on the final decision:

https://raw.githubusercontent.com/adv-panda/infodeslib_docs/main/docs/source/images/xai_3.PNG

The local feature importance of each selected classifier:

https://raw.githubusercontent.com/adv-panda/infodeslib_docs/main/docs/source/images/xai_4.png