oegedijk/explainerdashboard

Additional filters to select random transaction in what if tab

michaelromagne opened this issue · 2 comments

Hello, Thanks a lot for the awesome package !

I would like to be able to select a random transaction in the what if tab based on feature values. The current what if tab is very nice, with the ability to select labels and prediction score to isolate FP or FN in the case of binary classification. But I would like to be able to isolate for instance people from 70 to 80 years old in the case of a classification task with a feature "Age", in order to initialize my what if case.

Do you think it would be relevant to add this in the explainerdashboard library or should I customize my dashboard on my side ?

Thanks !

Hi michael, I can see the appeal of such a feature.

Would quickly get complicated though: you'd need a column selection dropdown, then either a range slider for numerical columns or a multiselect dropdown for categorical ones.

In order to implement this you would first add this possibility to the random_index methods (for both ClassifierExplainer and RegressionExplainer e.g. here:

(these methods are already a bit ugly with nested if statements, and probably will only get worse this way :)

Then you'd need to add some dynamic layout to the index selection component e.g. here:

class ClassifierRandomIndexComponent(ExplainerComponent):

All of this could probably be done, but I myself do not have the bandwidth for it right now. Would happily accept a PR though!

Hi, thanks for all the details, it is very useful. I will try to have the bandwith in the upcoming weeks/months for this PR