linkedin / linkedin/FastTreeSHAP
The notebook example is not working
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 566
- フォーク
- 38
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I tried to run the notebook example with the following code snippet:
shap_explainer = fasttreeshap.TreeExplainer(lgb_model)
num_leaves = sum(shap_explainer.model.num_nodes) - sum(sum(shap_explainer.model.children_left > 0))
print("Total number of leaves is {}.".format(num_leaves))
But got the error:
AttributeError Traceback (most recent call last)
<command-4123838717328114> in <cell line: 2>()
1 shap_explainer = fasttreeshap.TreeExplainer(lgb_model)
----> 2 num_leaves = sum(shap_explainer.model.num_nodes) - sum(sum(shap_explainer.model.children_left > 0))
3 print("Total number of leaves is {}.".format(num_leaves))
AttributeError: 'TreeEnsemble' object has no attribute 'num_nodes'
The lightbgm library version is '3.3.5'. Maybe you want to update the notebook correspondingly.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
示された TreeExplainer と num_leaves のスニペットを含む notebook の例を特定し、LightGBM 3.3.5 で AttributeError を再現してください。そのバージョンで実行できるように例を更新し、notebook が完了して葉の総数を報告することを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- machine-learning
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100