Beispiel #1
0
 public static void WriteKcHousePriceModel(string dataPath, Stream stream)
 {
     if (s_housePriceModel == null)
     {
         s_housePriceModel = CreateKcHousePricePredictorModel(dataPath);
     }
     s_housePriceModel.Save(s_environment, stream);
 }
Beispiel #2
0
 /// <summary>
 /// Save model to stream.
 /// </summary>
 /// <param name="stream">Stream to save model.</param>
 /// <returns></returns>
 public Task WriteAsync(Stream stream)
 {
     if (stream == null)
     {
         throw new ArgumentNullException(nameof(stream));
     }
     _predictorModel.Save(_env, stream);
     return(Task.CompletedTask);
 }