trainEAsync method
Implementation
Future<(bool, Mat logLikelihoods, Mat labels, Mat probs)> trainEAsync(
Mat samples,
Mat means0, {
VecMat? covs0,
Mat? weights0,
}) async {
final covs = covs0 ?? VecMat();
final weights = weights0 ?? Mat.empty();
try {
return await _emTrainAsync(
(l, lb, pr, p, cb) =>
cml.cv_ml_EM_trainE(ref, samples.ref, means0.ref, covs.ref, weights.ref, l, lb, pr, p, cb),
);
} finally {
if (covs0 == null) covs.dispose();
if (weights0 == null) weights.dispose();
}
}