MarcelRobeer / explabox

Explore/examine/explain/expose your model with the explabox!
https://explabox.readthedocs.io
GNU Lesser General Public License v3.0
14 stars 0 forks source link

ZeroDivisionError at section 5.1 of the drugsreview demo notebook #8

Open riwish opened 1 year ago

riwish commented 1 year ago

Summary of bug

Section 5.1 of the explabox drugsreview notebook returns a digestable and simultaneously shows two ZeroDivisionErrors. I'm not sure if the ZeroDivisionErrors are expected to occur or if I did something wrong. It doesn't seems like the issue interrupted the remainder part of the notebook sections but I wanted to point out this unexpected behaviour.

Environment information

Reproducing the bug

Steps to reproduce the behavior:

Run the explabox review notebook until section 5.1

...
box.expose.compare_metric(perturbation='upper')

Solutions Attempted

I didn't try to fix the problem as I haven't found the issue problematic. The desired output was shown. However, I was confused by the two ZeroDivision exceptions and didn't know if and how these exceptions affected the interpretation of the shown digestible.

Expected behavior

A digestible type of output without ZeroDvisionErrors or some kind of explanation (e.g. footnote) of how to interpret these ZeroDivision errors in the event that they might occur.

MarcelRobeer commented 1 year ago

This behavior is intended, as some metrics are ill-defined when divided by zero. Perhaps we should

  1. default their outputs to 0 and/or
  2. include an explanation/disclaimer when this behavior occurs (i.e. the metric is ill-defined)?