AttributeError: 'TreeEnsemble' object has no attribute 'values' This is due to a known issue with SHAP and LightGBM ( slundberg/shap#480 ). Check on line 98 of shap_helpers.py usually deals with this issue by calling SHAP explainer differently when categoricals are present.
07.03.2019 · 335 if tree_limit < 0 or tree_limit > self.model.values.shape [0]: --> 336 tree_limit = self.model.values.shape [0] 337. 338 # run the core algorithm using the C extension. AttributeError: TreeEnsemble instance has no attribute 'values'. The text was updated successfully, but these errors were encountered: Copy link.
29.01.2019 · The exception is AttributeError: 'TreeEnsemble' object has no attribute 'values'. I presume this is because 'threshold' in lgbm tree representation for such columns cannot be parsed to float. Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
16.09.2020 · 'TreeEnsemble' object has no attribute 'values'. the calculated interaction_values are Nan or 0. When I use shap for xgboost , the question 2 also is existed. Author mdjabc commented on Sep 17, 2020 explainer = shap.TreeExplainer (model) shap_values = …