문제

I'm trying to fit a random forest regression and I'd like to obtain a distribution of my estimate by looking at the output of every regression tree in the ensemble, returned to me in some sort of list. In R, providing the predict.all option in the randomForest predict method does this for me, Is there any way to do this in the RandomForestRegressor class in sklearn?

In 0.13 and above, I see the method apply which returns leaf indices, however I'm not sure how to use these, and I don't see any more clues in the doc for RandomForestRegressor.

Thanks for you help.

도움이 되었습니까?

해결책

Can you upgrade to 0.14? In 0.14, there is an estimators_ member that gives you access to the individual trees. See the RandomForestRegressor docs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top