Random Forests - Probability Estimates (+scikit-le

2020-05-27 17:21发布

I am interested in understanding how probability estimates are calculated by random forests, both in general and specifically in Python's scikit-learn library (where probability estimated are returned by the predict_proba function).

Thanks, Guy

2条回答
一纸荒年 Trace。
2楼-- · 2020-05-27 18:15

In addition to what Andreas/Dougal said, when you train the RF, turn on compute_importances=True. Then inspect classifier.feature_importances_ to see which features are occurring high-up in the RF's trees.

查看更多
可以哭但决不认输i
3楼-- · 2020-05-27 18:25

The probabilities returned by a forest are the mean probabilities returned by the trees in the ensemble (docs). The probabilities returned by a single tree are the normalized class histograms of the leaf a sample lands in.

查看更多
登录 后发表回答