41 references to Write
Microsoft.ML.CodeGenerator (41)
Templates\Console\PredictProgram.cs (41)
35this.Write("\r\nusing System;\r\nusing "); 36this.Write(this.ToStringHelper.ToStringWithCulture(Namespace)); 37this.Write(".Model;\r\n\r\nnamespace "); 38this.Write(this.ToStringHelper.ToStringWithCulture(Namespace)); 39this.Write(".ConsoleApp\r\n{\r\n class Program\r\n {\r\n static void Main(string[] args)" + 43this.Write(" ModelInput sampleData = new ModelInput()\r\n {\r\n"); 45this.Write(" "); 46this.Write(this.ToStringHelper.ToStringWithCulture(kv.Key)); 47this.Write("="); 48this.Write(this.ToStringHelper.ToStringWithCulture(kv.Value)); 49this.Write(",\r\n"); 51this.Write(" };\r\n"); 53this.Write(" ModelInput sampleData = new ModelInput();\r\n"); 55this.Write("\r\n\t\t\t// Make a single prediction on the sample data and print results\r\n\t\t\tvar pre" + 58this.Write("\t\t\tConsole.WriteLine(\"Using model to make single prediction -- Comparing actual "); 59this.Write(this.ToStringHelper.ToStringWithCulture(Utils.Normalize(LabelName))); 60this.Write(" with predicted "); 61this.Write(this.ToStringHelper.ToStringWithCulture(Utils.Normalize(LabelName))); 62this.Write(" from sample data...\\n\\n\");\r\n"); 66this.Write("\t\t\tConsole.WriteLine($\""); 67this.Write(this.ToStringHelper.ToStringWithCulture(kv.Key)); 68this.Write(": {sampleData."); 69this.Write(this.ToStringHelper.ToStringWithCulture(kv.Key)); 70this.Write("}\");\r\n"); 74this.Write("\t\t\tConsole.WriteLine($\"\\n\\nPredicted "); 75this.Write(this.ToStringHelper.ToStringWithCulture(Utils.Normalize(LabelName))); 76this.Write(": {predictionResult.Prediction}\\n\\n\");\r\n"); 78this.Write("\t\t\tConsole.WriteLine($\"\\n\\nPredicted "); 79this.Write(this.ToStringHelper.ToStringWithCulture(Utils.Normalize(LabelName))); 80this.Write(": {predictionResult.Score}\\n\\n\");\r\n"); 82this.Write("\t\t\tConsole.WriteLine($\"\\n\\nPredicted "); 83this.Write(this.ToStringHelper.ToStringWithCulture(Utils.Normalize(LabelName))); 84this.Write(" value {predictionResult.Prediction} \\nPredicted "); 85this.Write(this.ToStringHelper.ToStringWithCulture(Utils.Normalize(LabelName))); 86this.Write(" scores: [{String.Join(\",\", predictionResult.Score)}]\\n\\n\");\r\n"); 88this.Write("\t\t\tConsole.WriteLine(\"\\n\\nPredicted Boxes:\\n\");\r\n Console.WriteLine(pr" + 91this.Write(" Console.WriteLine(\"=============== End of process, hit any key to fin" + 111this.Write(@"//***************************************************************************************** 124this.Write("// This file was auto-generated by ML.NET Model Builder. \r\n"); 265this.Write(textToAppend); 274this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));