calculate shannon entropy

in service of decision trees