marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.4k stars 1.79k forks source link

ans = self.domain_mapper.map_exp_ids(self.local_exp[label_to_use], **kwargs) KeyError: 1 #735

Open Drjacky opened 6 months ago

Drjacky commented 6 months ago

My input value: Log.e("t","api_key="123"); val tt = "ddd"

main.py", line 139, in show_reason_binary
word_list = str(exp.as_list())
                   ^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/lime/explanation.py", line 141, in as_list
    ans = self.domain_mapper.map_exp_ids(self.local_exp[label_to_use], **kwargs)
                                         ~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 1

Version: 0.2.0.1 Location: /opt/homebrew/lib/python3.11/site-packages