def test_calculate_shannon_entropy(self): h = DecisionTree._calculate_shannon_entropy(self.sample_output) self.assertAlmostEqual( h, 0.970951, places=5, msg='Shannon entropy should be 0.970951, but get: %f' % h)
def test_calculate_shannon_entropy(self): h = DecisionTree._calculate_shannon_entropy(self.sample_output) self.assertAlmostEqual(h, 0.970951, places=5, msg="Shannon entropy should be 0.970951, but get: %f" % h)