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

Random Forest - Vector subscript out range during training

$
0
0
I am trying OpenCV (3.0) random forest implementation for the first time. The forest->train always throws the "vector subscript out of range error". My code is here, cv::ml::RTrees::Params params = cv::ml::RTrees::Params::Params(); cv::Ptr forest = cv::ml::RTrees::create(); forest->train(trainingData, cv::ml::ROW_SAMPLE, trainingClass); The trainingData is (CV_32F, 1,24,1800) and the trainingClass is (CV_32F, 1,1,1800). 24 is the number of features and 1800 is the total number of samples. Even if I changed the layout to COL_SAMPLE, it throws an error like " Assertion failed < || Where am I wrong?. Please suggest a solution.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



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