fit method

void fit(
  1. List<List<double>> X,
  2. List<int> y
)

Implementation

void fit(List<List<double>> X, List<int> y) {
  // encode labels 0/1 as numeric targets and fit a regressor to approximate
  // the logit of probabilities; for simplicity we fit directly to y.
  final targets = y.map((v) => v.toDouble()).toList();
  _reg.fit(X, targets);
}