小编ash*_*his的帖子

如何在python/R中访问xgboost模型的各个树

如何在python/R中访问xgboost模型的各个树?

下面我来自sklearn的随机森林树木.

estimator = RandomForestRegressor(oob_score = True,n_estimators = 10,max_features ='auto')estimator.fit(tarning_data,traning_target)tree1 = estimator.estimators_ [0] leftChild
= tree1.tree_.children_left rightChild = tree1.tree_.children_right

python r machine-learning scikit-learn xgboost

11
推荐指数
1
解决办法
3444
查看次数

标签 统计

machine-learning ×1

python ×1

r ×1

scikit-learn ×1

xgboost ×1