public void New_Evaluation() { var dataPath = GetDataPath(SentimentDataPath); var testDataPath = GetDataPath(SentimentTestPath); using (var env = new LocalEnvironment(seed: 1, conc: 1)) { var reader = new TextLoader(env, MakeSentimentTextLoaderArgs()); // Pipeline. var pipeline = new TextLoader(env, MakeSentimentTextLoaderArgs()) .Append(new TextTransform(env, "SentimentText", "Features")) .Append(new LinearClassificationTrainer(env, new LinearClassificationTrainer.Arguments { NumThreads = 1 }, "Features", "Label")); // Train. var readerModel = pipeline.Fit(new MultiFileSource(dataPath)); // Evaluate on the test set. var dataEval = readerModel.Read(new MultiFileSource(testDataPath)); var evaluator = new MyBinaryClassifierEvaluator(env, new BinaryClassifierEvaluator.Arguments() { }); var metrics = evaluator.Evaluate(dataEval); } }