oegedijk / explainerdashboard

Quickly build Explainable AI dashboards that show the inner workings of so-called "blackbox" machine learning models.

Home Page:http://explainerdashboard.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some tabs on dashboard don't work

andriusdc opened this issue · comments

I've been trying to use ExplainerDashboard() on a ClassifierExplainer() fitted on a XGBClassifier model. Feature Importance and Classification Stats tabs are working great, however, every other component that requires index selection are not. Since my dataframe has 16k rows, I've tryied to change max_idx_in_dropdown to 20k, but then the same warning message keeps showing, no matter the value of max_idx_in_dropdown:

"WARNING: the number of idxs (=16063) > max_idxs_in_dropdown(=1000). However with your installed version of dash(2.9.3) dropdown search may not work smoothly. You can downgrade to pip install dash==2.6.2 which should work better for now..."

Here is my code:

`
explainer = ClassifierExplainer(
bst,
df_test[features],
df_test['target'],
X_background=df_train[features],
model_output='probability',
na_fill=-1000,
idxs=df_test[features].index,
index_name="index",
shap="tree",
)

ExplainerDashboard(explainer,
max_idx_in_dropdown=20000,
mode='external'
).save_html("/root/dashboard.html")
`

Here are the prints from the dashboard

image
image
image

Did you try downgrading to dash 2.6.2?

I did downgrade, but I still get the same results

Hi, so finally had some time to investigate, but this has to do with how the index selection and subsequent index fields gets filled with server side index filtering (which is why for now by default no index is selected by default).

however you can explicitly pass an index (either string or positional int) when outputting html:

ExplainerDashboard(explainer,
max_idx_in_dropdown=20000, 
index=0,
).save_html("/root/dashboard.html")