Evaluating the given test sample¶
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]]
knorau.get_rareness_score(n_clusters=10, query = query)