predictOne method

int predictOne(
  1. List<double> x
)

Predict a single example, returning {-1, +1}.

Implementation

int predictOne(List<double> x) {
  if (_model == null) throw StateError('Model not fitted');
  return predictLinearSVM(_model!, x);
}