/// <summary> /// Make a prediction using the standard interface /// </summary> /// <param name="input">an instance of hate_coremlInput to predict from</param> /// <param name="error">If an error occurs, upon return contains an NSError object that describes the problem.</param> public hate_coremlOutput GetPrediction(hate_coremlInput input, out NSError error) { if (input == null) { throw new ArgumentNullException(nameof(input)); } var prediction = model.GetPrediction(input, out error); if (prediction == null) { return(null); } var output1Value = prediction.GetFeatureValue("output1").MultiArrayValue; return(new hate_coremlOutput(output1Value)); }
/// <summary> /// Make a prediction using the convenience interface /// </summary> /// <param name="input1"> as 1 1-dimensional array of doubles</param> /// <param name="options">prediction options</param> /// <param name="error">If an error occurs, upon return contains an NSError object that describes the problem.</param> public hate_coremlOutput GetPrediction(MLMultiArray input1, MLPredictionOptions options, out NSError error) { var input = new hate_coremlInput(input1); return(GetPrediction(input, options, out error)); }