2024-10-01 22:26:38 发布
网友
是否可以从Python中的h2oxgboosttestimator模型中提取本机xgboost模型pickle文件并由原始的xgboost Python API读入?谢谢!在
您可以使用以下方法:
import matplotlib.pyplot as plt from xgboost import plot_tree # model is your xgboost model, choose which tree in num_trees and layout direction default if top to bottom, LR is left to right plot_tree(model, num_trees=0, rankdir='LR') plt.show()
这里是一个完全可复制的示例,但请注意它使用的是xgboost repo中的dataset,并使用这个example来创建模型
您可以使用以下方法:
这里是一个完全可复制的示例,但请注意它使用的是xgboost repo中的dataset,并使用这个example来创建模型
^{pr2}$相关问题 更多 >
编程相关推荐