I am having trouble with training a Boosted trees model for regression. I am using the code below to train the model, but get a runtime error for “vector subscript out of range”
Ptr<TrainData> trainingData = TrainData::create(dataset_opencv.trainData, ROW_SAMPLE, dataset_opencv.trainLabels); Ptr<Boost> Mdl = Boost::create(); Mdl->setWeakCount(200); Mdl->setBoostType(cv::ml::Boost::GENTLE); Mdl->setUseSurrogates(false); Mdl->setMaxCategories(200); Mdl->setRegressionAccuracy(0.05); Mdl->train(trainingData);
My data and responses are cv::Mats with the exact same number of rows. The training data is 25 columns, the labels are 1 column, and both are CV_32F. Using the same training data for training a Random Forest model is running with no issue. Is there something I’m doing wrong in setting the parameters for Boosted Trees model?