public TestResultsForm( ClassifierPerformance perf ) { this.perf = perf; InitializeComponent( ); // Show the results ShowResults( ); }
// Test the classifier public override ClassifierPerformance Test(ClassificationData testData) { ClassifierPerformance perf = new ClassifierPerformance(testData); foreach (ISample sample in testData.Samples) { // Obtain the extimated category string expectedCategory = Classify(sample); // Compare with the actual category string actualCategory = sample.Category; perf.Add(expectedCategory, actualCategory); } return(perf); }