int predict(List<double> x, {double threshold = 0.5}) { final p = _reg.predictOne(x); return p >= threshold ? 1 : 0; }