private void PrintSingleEvaluation(CalibratedBinaryClassificationMetrics metrics) { Console.WriteLine(); Console.WriteLine($"************************************************"); ConsoleWriterHelper.WriteLineForTable("Model quality metrics evaluation"); Console.WriteLine($"*----------------------------------------------*"); ConsoleWriterHelper.WriteLineForTable($"Accuracy: {metrics.Accuracy:P2}"); ConsoleWriterHelper.WriteLineForTable($"Auc: {metrics.AreaUnderRocCurve:P2}"); Console.WriteLine($"************************************************"); }
private void PrintEvaluation(IEnumerable <CalibratedBinaryClassificationMetrics> crossValidationMetrics) { foreach (var foldMetrics in crossValidationMetrics) { PrintSingleEvaluation(foldMetrics); } Console.WriteLine(); Console.WriteLine(); Console.WriteLine($"************************************************"); ConsoleWriterHelper.WriteLineForTable("AVERAGE METRICS"); Console.WriteLine($"*----------------------------------------------*"); ConsoleWriterHelper.WriteLineForTable($"Accuracy: {crossValidationMetrics.Average(m => m.Accuracy):P2}"); ConsoleWriterHelper.WriteLineForTable($"Auc: {crossValidationMetrics.Average(m => m.AreaUnderRocCurve):P2}"); Console.WriteLine($"************************************************"); }