Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

How to obtain probability estimates from RTrees classifier in OpenCV 3.x?

$
0
0
I am using OpenCV's implementation of [Random Forests](http://docs.opencv.org/master/d0/d65/classcv_1_1ml_1_1RTrees.html#gsc.tab=0) to classify some data. It appears to be working well, but I would like to obtain confidence values for the different classes. The output of `RTrees::predict` gives me a class number but I can't find a confidence or probability. For example, scikit-learn provides this information in is `predict_proba` method ([docs](http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier.predict_proba)):
The predicted class probabilities of an input sample is computed as the mean predicted class probabilities of the trees in the forest. The class probability of a single tree is the fraction of samples of the same class in a leaf.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>