Пример #1
0
        private void CvWord_OnClassifierScored(object sender, ClassifierValidationResult e)
        {
            rtbScoreWord.Text += "\r\nMessages: " + e.Total;
            rtbScoreWord.Text += "\r\nCorrect: " + e.Correct;
            rtbScoreWord.Text += "\r\nIncorrect: " + e.Wrong;
            rtbScoreWord.Text += "\r\nAccuracy: " + (e.Accuracy * 100).ToString("0.00") + "%";
            rtbScoreWord.Text += "\r\nTime: " + (int)e.ElapsedTime.TotalMilliseconds + "ms";
            rtbScoreWord.Text += "\r\nResults saved to " + sfdClassified.FileName;

            btnWord.Enabled = true;
        }
Пример #2
0
        private void Cv_OnClassifierScored(object sender, ClassifierValidationResult e)
        {
            rtbScore.Text += "\r\nMessages: " + e.Total;
            rtbScore.Text += "\r\nCorrect: " + e.Correct;
            rtbScore.Text += "\r\nIncorrect: " + e.Wrong;
            rtbScore.Text += "\r\nAccuracy: " + (e.Accuracy * 100).ToString("0.00") + "%";
            rtbScore.Text += "\r\nTime: " + (int)e.ElapsedTime.TotalMilliseconds + "ms";
            rtbScore.Text += "\r\nResults saved to " + sfdClassified.FileName;

            using (StreamWriter w = new StreamWriter(sfdClassified.FileName))
            {
                w.WriteLine("Correct,Guess,Message");

                foreach (LabeledMessage message in e.LabeledMessages)
                {
                    w.WriteLine(message.RealClassification + "," + message.ModelClassification + "," + message.Message);
                }
            }

            btnClassifyFile.Enabled = true;
        }