predictOne method

int predictOne(
  1. List<double> features
)

Predict label (0/1) using 0.5 threshold.

Implementation

int predictOne(List<double> features) =>
    predictProba(features) >= 0.5 ? 1 : 0;