如何在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