'Can not select a tree - XGBoost with Random Forest Classifier in Python

I'm trying to work with XGBoost and a Random Forest Classifier in Python. The issue I'm facing is that I can not select a specific estimator when I use XGBRFClassifier from xgboost (because it do not have the model.estimator_[n] option). However, when I use RandomForestClassifier from sklearn.ensemble I can select the estimator I desire by doing model.estimator_[n]. Below are the libs I used:

from sklearn.ensemble import RandomForestClassifier #this one works
from xgboost import XGBRFClassifier #this one doesn't work

I can provide more information if it is needed. Thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source