Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
qchiujunhao committed Nov 7, 2024
1 parent 1f2a501 commit 6632d11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/feature_importance.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def save_tree_importance(self):
self.output_dir,
'tree_importance.png')
plt.savefig(plot_path)
plt.close()
plt.close()
self.plots['tree_importance'] = plot_path

def save_shap_values(self):
Expand All @@ -89,8 +89,8 @@ def save_shap_values(self):
explainer = shap.Explainer(model)
shap_values = explainer.shap_values(
self.exp.get_config('X_transformed'))
shap.summary_plot(shap_values, self.exp.get_config('X_transformed'),
show=False)
shap.summary_plot(shap_values,
self.exp.get_config('X_transformed'), show=False)
plt.title('Shap (LightGBM)')
plot_path = os.path.join(
self.output_dir, 'shap_summary.png')
Expand Down

0 comments on commit 6632d11

Please sign in to comment.