Как получить доступ к отдельным деревьям модели xgboost в python / R
Как получить доступ к отдельным деревьям модели xgboost в python / R?
Ниже я получаю из Рандом Форест деревья от склеарн.
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