train method

bool train(
  1. Mat samples,
  2. int layout,
  3. Mat responses
)

Trains the model on samples (CV_32F, one sample per row for ROW_SAMPLE).

Implementation

bool train(Mat samples, int layout, Mat responses) {
  final p = calloc<ffi.Bool>();
  try {
    cvRun(() => cml.cv_ml_DTrees_train_1(ref, samples.ref, layout, responses.ref, p, ffi.nullptr));
    return p.value;
  } finally {
    calloc.free(p);
  }
}