gumption/Python_for_Data_Science

entropy calculation is not right

Closed this issue · 1 comments

in your simple_ml.py file. The entropy calculation is not correct.
it should be child_entropy = value_probability * math.log(value_probability, 2)
instead of using math.log(value_probability. num_values)

Thanks. Fixed bug and committed new version.