getVotes method

Mat getVotes(
  1. Mat samples, {
  2. int flags = 0,
})

Returns the result of each individual tree in the forest.

For classification (DTrees.PREDICT_MAX_VOTE, the default) the first row holds the class labels and each following row the number of votes of one sample of samples for each class (CV_32S). For regression, with DTrees.PREDICT_SUM, or for a 2-class model with StatModel.RAW_OUTPUT, each row holds the value of each tree for one sample (CV_32F).

Implementation

Mat getVotes(Mat samples, {int flags = 0}) {
  final rval = Mat.empty();
  cvRun(() => cml.cv_ml_RTrees_getVotes(ref, samples.ref, rval.ref, flags, ffi.nullptr));
  return rval;
}