Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in tree_specific_reason() #18

Open
gildasmorvan opened this issue Jun 17, 2024 · 0 comments
Open

Bug in tree_specific_reason() #18

gildasmorvan opened this issue Jun 17, 2024 · 0 comments

Comments

@gildasmorvan
Copy link
Contributor

Calling explainer.tree_specific_reason() and explainer.minimal_tree_specific_reason() on boosted trees raise this error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[34], line 6
      4 for instance, prediction in instances:
      5     explainer = Explainer.initialize(model, instance)
----> 6     tree_specific = explainer.tree_specific_reason()
      7     minimal = explainer.minimal_tree_specific_reason()
      8     display(HTML(f"<h4>Explanations for instance: {i}"))

File ~/Logiciels/pyxai/pyxai/sources/core/explainer/explainerBT.py:264, in ExplainerBT.tree_specific_reason(self, n_iterations, time_limit, seed, history)
    260     time_limit = 0
    262 if self.c_BT is None:
    263     # Preprocessing to give all trees in the c++ library
--> 264     self.c_BT = c_explainer.new_classifier_BT(self._boosted_trees.n_classes)
    266     for tree in self._boosted_trees.forest:
    267         c_explainer.add_tree(self.c_BT, tree.raw_data_for_CPP())

AttributeError: module 'c_explainer' has no attribute 'new_classifier_BT'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant