Ask Your Question

Random Forest predict_prob in OpenCV 3.0

asked 2015-11-09 01:53:46 -0500

prox gravatar image


I'm looking for the predict probability functionality for binary classification task present in 2.x releases. As far as I see it is gone, is there a tendency towards getting it back?

Best regards, chris

edit retag flag offensive close merge delete



Hi @prox, have you found a solution for your problem? If so, I would be thankful if you please share it with us. Thanks

mask2007 gravatar imagemask2007 ( 2016-02-04 09:02:18 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-11-09 04:37:35 -0500

thdrksdfthmn gravatar image

I would suggest you to use StatModel::load<RTrees>(filename); and then use the predict of the StatModel::predict.

edit flag offensive delete link more


But instead of the pure class value I would like to have the probability of the sample(s) being part of the first class, as long as it is a 2-Class problem.

In recent version we had Random Forests' predict_prob method to do so which I am missing in latest version.

prox gravatar imageprox ( 2015-11-10 01:00:03 -0500 )edit

Uh, I did not know about it... Actually it is sad that it's not anymore in OpenCV 3 :(

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-11-10 02:14:39 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-11-09 01:53:46 -0500

Seen: 322 times

Last updated: Nov 09 '15