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