From c8893f0f7d901421fad192ece9feddd60111b428 Mon Sep 17 00:00:00 2001 From: Ayrat Hudaygulov Date: Sun, 21 Jul 2024 14:10:39 +0100 Subject: [PATCH] fixed again? (#32) * fixed again? * fix --- src/VahterBanBot/ML.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VahterBanBot/ML.fs b/src/VahterBanBot/ML.fs index 0d6efad..38068b1 100644 --- a/src/VahterBanBot/ML.fs +++ b/src/VahterBanBot/ML.fs @@ -28,10 +28,11 @@ type MachineLearning( ) = let metricsToString(metrics: CalibratedBinaryClassificationMetrics) (duration: TimeSpan) = let sb = StringBuilder() + let formattedTable = metrics.ConfusionMatrix.GetFormattedConfusionTable().Replace(".", "\\.") %sb.AppendLine($"Model trained in {duration.TotalSeconds} seconds with following metrics:") %sb.AppendLine($"Accuracy: {metrics.Accuracy}") %sb.AppendLine($"AreaUnderPrecisionRecallCurve: {metrics.AreaUnderPrecisionRecallCurve}") - %sb.AppendLine($"ConfusionMatrix:\n```\n{metrics.ConfusionMatrix.GetFormattedConfusionTable()}\n```") + %sb.AppendLine($"ConfusionMatrix:\n```\n{formattedTable}\n```") %sb.AppendLine($"Entropy:{metrics.Entropy}") %sb.AppendLine($"F1Score:{metrics.F1Score}") %sb.AppendLine($"LogLoss:{metrics.LogLoss}")