Reputation: 4165
Since there is randomness involved in the computation of a random forest classifier, it is necessary to define a random seed to get reproducible results. How does one do this for OpenCV CvRTrees
? I do not see such a parameter in CvRTParams
.
Update: The API change of OpenCV 3 removed CvRTParams
. However, the title question remains.
Upvotes: 3
Views: 846
Reputation: 39806
it depends on the opencv version you are using.
While 2.4.9 seems to use the global cv::theRNG()
, where you can just set theRNG().state = something
,
This no longer seems to be possible in opencv3.0
Upvotes: 3