Alibi Overview Examples
pip install alibi[all]!pip install -q seabornimport requests
from io import BytesIO, StringIO
from io import BytesIO
from zipfile import ZipFile
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
import seaborn as sns
sns.set(rc={'figure.figsize':(11.7,8.27)})
import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import joblib
import os.path
import tensorflow as tf
np.random.seed(0)
tf.random.set_seed(0)
FROM_SCRATCH = False
TF_MODEL_FNAME = 'tf-clf-wine'
RFC_FNAME = 'rfc-wine'
ENC_FNAME = 'wine_encoder'
DEC_FNAME = 'wine_decoder'Preparing the data.
Select good wine instance
Training models
Creating an Autoencoder
Random Forest Model
Tensorflow Model
Load/Make models
Util functions
Local Feature Attribution
Integrated Gradients

Kernel SHAP


Interventional treeSHAP

Path Dependent treeSHAP

Local Necessary Features
Anchors
Global Feature Attribution
ALE

Counterfactuals
Counter Factuals with Reinforcement Learning


Counterfactual Instances


Contrastive Explanations Method


Counterfactual With Prototypes



Last updated
Was this helpful?

