mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
9 lines
241 B
Python
9 lines
241 B
Python
import lightgbm as lgb
|
|
import matplotlib.pyplot as plt
|
|
import sys
|
|
|
|
model = lgb.Booster(model_file=sys.argv[1])
|
|
|
|
img = lgb.plot_tree(model, tree_index=0, figsize=(20, 8), show_info=[
|
|
"leaf_value", "feature_name", "threshold"])
|
|
plt.show()
|