XGboost 中有如下方法:
xgb.plot_tree(model, num_trees=2)
如果参数 n_estimators 的值超过10或100,绘制其中一棵树又有什么意义呢?
回答:
xgb.plot_tree()
只会绘制创建的 n 棵树中的一棵。例如,xgb.plot_tree(model, num_trees=2)
将会绘制索引为2的树。
查看示例请点击这里
XGboost 中有如下方法:
xgb.plot_tree(model, num_trees=2)
如果参数 n_estimators 的值超过10或100,绘制其中一棵树又有什么意义呢?
回答:
xgb.plot_tree()
只会绘制创建的 n 棵树中的一棵。例如,xgb.plot_tree(model, num_trees=2)
将会绘制索引为2的树。
查看示例请点击这里