interpretml / interpret-text

A library that incorporates state-of-the-art explainers for text-based machine learning models and visualizes the result with a built-in dashboard.
MIT License
409 stars 68 forks source link

Running text_classification_introspective_rationale_explainer.ipynb with multi-class dataset #222

Open HenryLiuPI opened 10 months ago

HenryLiuPI commented 10 months ago

I'm getting RuntimeError: multi-target not supported at ..\aten\src\THNN/generic/ClassNLLCriterion.c:20 while trying to feed multi-class dataset.

My training data looks like this. I'm using one-hot format as label. image

I'm getting the error on explainer.fit(df_train, df_test) image

The dataset is a multi-class dataset and has 8 labels in total. Each sample may contain multi labels. What format should I use to represent the label?