def _check_data(self, all_data): stats = QueryStatistics() for data in all_data: (input_list, _, result, _) = data result = result[0] query_output = self.net.query(input_list) query_result = interprete(query_output) stats.add_result(result, query_result) return stats
def test_interprete_0_middle_2(self): result = interprete([0.48, 0.58]) self.assertEqual(result, 0)
def test_interprete_0_high(self): result = interprete([0.7, 0.6]) self.assertEqual(result, 0)
def test_interprete_0_low(self): result = interprete([0.4, 0.45]) self.assertEqual(result, 0)
def test_interprete_2(self): result = interprete([0.3, 0.7]) self.assertEqual(result, 2)
def test_interprete_1(self): result = interprete([0.61, 0.39]) self.assertEqual(result, 1)
def get_prediction(self): prediction = interprete(self.v_out) return prediction