@@ -41,27 +41,27 @@ public virtual string TransformText()
41
41
this . Write ( this . ToStringHelper . ToStringWithCulture ( TestPath ) ) ;
42
42
this . Write ( "\" ;\r \n " ) ;
43
43
}
44
- this . Write ( " private static string ModelPath = @\" ./ model.zip\" ;\r \n \r \n // Set this " +
45
- "flag to enable the training process.\r \n private static bool EnableTraining " +
46
- " = false;\r \n \r \n static void Main(string[] args)\r \n {\r \n // " +
47
- "Create MLContext to be shared across the model creation workflow objects \r \n " +
48
- " // Set a random seed for repeatable/deterministic results across multiple " +
49
- " trainings.\r \n var mlContext = new MLContext(seed: 1);\r \n \r \n " +
50
- "if (EnableTraining)\r \n {\r \n // Create, Train, Evaluate a " +
51
- "nd Save a model\r \n BuildTrainEvaluateAndSaveModel(mlContext); \r \n " +
52
- " ConsoleHelper.ConsoleWriteHeader(\" =============== End of training p " +
53
- "rocess ===============\" );\r \n }\r \n else\r \n {\r \n " +
54
- " ConsoleHelper.ConsoleWriteHeader(\" Skipping the training process. Plea " +
55
- "se set the flag : \' EnableTraining\' to \' true\' to enable the training process. \" ); \r " +
56
- "\ n }\r \n \r \n // Make a single test prediction loading the model " +
57
- " from .ZIP file\r \n TestSinglePrediction(mlContext);\r \n \r \n Con " +
58
- "soleHelper .ConsoleWriteHeader(\" =============== End of process, hit any key to fi " +
59
- "nish ===============\" );\r \n Console.ReadKey();\r \n \r \n }\r \n \r \n " +
60
- "private static ITransformer BuildTrainEvaluateAndSaveModel(MLContext mlContext) \r " +
61
- "\ n {\r \n // Data loading\r \n IDataView trainingDataView " +
62
- "= mlContext.Data.ReadFromTextFile<SampleObservation>(\r \n " +
63
- " path: TrainDataPath,\r \n " +
64
- " hasHeader : " ) ;
44
+ this . Write ( " private static string ModelPath = @\" .. \\ .. \\ .. \\ model.zip\" ;\r \n \r \n // Se " +
45
+ "t this flag to enable the training process.\r \n private static bool EnableT " +
46
+ "raining = false;\r \n \r \n static void Main(string[] args)\r \n {\r \n " +
47
+ " // Create MLContext to be shared across the model creation workflow objects " +
48
+ "\r \n // Set a random seed for repeatable/deterministic results across m " +
49
+ "ultiple trainings.\r \n var mlContext = new MLContext(seed: 1);\r \n \r \n " +
50
+ " if (EnableTraining)\r \n {\r \n // Create, Train, Eva " +
51
+ "luate and Save a model\r \n BuildTrainEvaluateAndSaveModel(mlContext" +
52
+ "); \r \n ConsoleHelper.ConsoleWriteHeader(\" =============== End of tra " +
53
+ "ining process ===============\" );\r \n }\r \n else\r \n {" +
54
+ "\r \n ConsoleHelper.ConsoleWriteHeader(\" Skipping the training proces " +
55
+ "s. Please set the flag : \' EnableTraining\' to \' true\' to enable the training proce " +
56
+ "ss. \" ); \r \ n }\r \n \r \n // Make a single test prediction loading th " +
57
+ "e model from .ZIP file\r \n TestSinglePrediction(mlContext);\r \n \r \n " +
58
+ " ConsoleHelper .ConsoleWriteHeader(\" =============== End of process, hit any ke " +
59
+ "y to finish ===============\" );\r \n Console.ReadKey();\r \n \r \n }\r \n \r \n " +
60
+ " private static ITransformer BuildTrainEvaluateAndSaveModel(MLContext mlCo " +
61
+ "ntext) \r \ n {\r \n // Data loading\r \n IDataView trainingDa " +
62
+ "taView = mlContext.Data.ReadFromTextFile<SampleObservation>(\r \n " +
63
+ " path: TrainDataPath,\r \n " +
64
+ " hasHeader : " ) ;
65
65
this . Write ( this . ToStringHelper . ToStringWithCulture ( HasHeader . ToString ( ) . ToLowerInvariant ( ) ) ) ;
66
66
this . Write ( ",\r \n separatorChar : \' " ) ;
67
67
this . Write ( this . ToStringHelper . ToStringWithCulture ( Regex . Escape ( Separator . ToString ( ) ) ) ) ;
0 commit comments