def test_compare_by_index_stats_nearly_identical_annotations_avg_accuracy(self): """ Tests that when compare_by_index_stats() is called with nearly identical Annotations, the average accuracy is less than 1. """ annotations1 = Annotations(self.ann_file_path_one_modified) annotations2 = Annotations(self.ann_file_path_one) comparison = annotations1.compare_by_index_stats(annotations2) accuracy = comparison["avg_accuracy"] self.assertLess(accuracy, 1)
def test_compare_by_index_stats_equivalent_annotations_avg_accuracy_one(self): """ Tests that when compare_by_index_stats() is called on two Annotations representing the same dataset, the average accuracy is one. """ annotations1 = Annotations(self.ann_file_path_one) annotations2 = Annotations(self.ann_file_path_one) comparison = annotations1.compare_by_index_stats(annotations2) actual = comparison["avg_accuracy"] self.assertEqual(actual, 1)