image_output_1.png
from sklearn.ensemble import RandomForestRegressor

model = RandomForestRegressor(random_state=1)

model.fit(X_train, y_train)
preds_valid = model.predict(X_valid)

trees = model.get_booster().get_dump()
print(len(trees))
print(trees[0])