/// <summary> /// Predicts numeric value for the specified model. /// </summary> /// <param name="model">The model.</param> /// <param name="dataForPrediction">The data for prediction.</param> /// <param name="proxy">The proxy.</param> /// <returns> /// Numeric value result. /// </returns> protected override List <double> Predict(MLModelConfig model, IList <Dictionary <string, object> > dataForPrediction, IMLServiceProxy proxy) { List <double> predictionResults = proxy.Regress(model.ModelInstanceUId, dataForPrediction); return(predictionResults); }
/// <summary> /// Predicts using the specified proxy. /// </summary> /// <param name="proxy">The proxy.</param> /// <param name="model">The model.</param> /// <param name="data">The input data.</param> /// <returns> /// Predicted result. /// </returns> protected override double Predict(IMLServiceProxy proxy, MLModelConfig model, Dictionary <string, object> data) { var wrappedData = new List <Dictionary <string, object> > { data }; return(proxy.Regress(model.ModelInstanceUId, wrappedData).FirstOrDefault()); }
/// <summary> /// Predicts results for the given batch of records. /// </summary> /// <param name="model">The model.</param> /// <param name="dataForPrediction"></param> /// <param name="proxy">ML service proxy.</param> /// <returns> /// Prediction result. /// </returns> /// <exception cref="System.NotImplementedException"></exception> protected override List <double> Predict(MLModelConfig model, IList <Dictionary <string, object> > dataList, IMLServiceProxy proxy) { return(proxy.Regress(model.ModelInstanceUId, dataList)); }