public override float Predict(ModelDataSet data) { if (TrainedModel == null) { throw new Exception("Must initialize the model before calling"); } lock (TrainedModel) { var result = PredictFunc.Predict(data); return(result.Score); } }
public override float Predict(DataSet data) { if (TrainedModel == null) { throw new InvalidOperationException("Must train/load a model before evaluating"); } lock (TrainedModel) { #if ML_LEGACY var result = TrainedModel.Predict(data); return(result.Score); #else var result = PredictFunc.Predict(data); return(result.Score); #endif } }